We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1320927 commit cee233dCopy full SHA for cee233d
cmake/compilers.cmake
@@ -1,9 +1,19 @@
1
-if(NOT MSVC)
+if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|Intel")
2
add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wall>)
3
endif()
4
5
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
6
+ add_compile_options(
7
+ "$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:Debug,RelWithDebInfo>>:-Wextra>"
8
+ )
9
+endif()
10
+
11
if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
12
add_compile_options($<$<COMPILE_LANGUAGE:Fortran>:-Wall>)
13
14
+ "$<$<AND:$<COMPILE_LANGUAGE:Fortran>,$<CONFIG:Debug,RelWithDebInfo>>:-Wextra;-fcheck=all;-Werror=array-bounds>"
15
16
17
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
18
add_compile_options(
19
"$<$<COMPILE_LANGUAGE:Fortran>:-warn>"
0 commit comments