We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aef0bfb commit c1f96f4Copy full SHA for c1f96f4
cmake/compiler_warnings.cmake
@@ -0,0 +1,22 @@
1
+ecbuild_add_option( FEATURE WARNINGS
2
+ DEFAULT ON
3
+ DESCRIPTION "Add warnings to compiler" )
4
+
5
+# activate warnings, ecbuild macros check the compiler recognises the options
6
+if(HAVE_WARNINGS)
7
8
+ ecbuild_add_cxx_flags("-Wall")
9
+ ecbuild_add_cxx_flags("-Wextra")
10
11
+ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
12
+ ecbuild_add_cxx_flags("-Wno-unused-parameter")
13
+ ecbuild_add_cxx_flags("-Wno-unused-sign-compare")
14
+ endif()
15
16
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
17
18
+ ecbuild_add_cxx_flags("-Wno-sign-compare")
19
20
21
22
0 commit comments