aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a2abc7d1b3..c49e252ccb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -178,6 +178,13 @@ else()
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-parameter>
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-missing-field-initializers>)
+ if (ENABLE_WERROR AND (NOT MSVC))
+ add_compile_options(
+ $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-error=unused>
+ $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-error=unused-function>
+ )
+ endif()
+
if (CXX_CLANG OR CXX_ICC OR CXX_APPLE) # Clang, AppleClang, or Intel C++
if (NOT MSVC)
add_compile_options(