Skip to content

Commit f5154b2

Browse files
committed
better compiler warning
1 parent 8d48e9f commit f5154b2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/compilers.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ endif()
1717

1818
# --- compiler options
1919

20+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
21+
add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:-Wall;-Wextra>")
22+
endif()
23+
2024
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
2125
add_compile_options(-Wall -Wextra
2226
"$<$<COMPILE_LANGUAGE:Fortran>:-fimplicit-none>"
@@ -25,7 +29,6 @@ add_compile_options(-Wall -Wextra
2529
)
2630
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
2731
add_compile_options(
28-
$<IF:$<BOOL:${WIN32}>,/QxHost,-xHost>
2932
"$<$<COMPILE_LANGUAGE:Fortran>:-warn>"
3033
"$<$<COMPILE_LANGUAGE:C,CXX>:-Wall>"
3134
"$<$<AND:$<COMPILE_LANGUAGE:Fortran>,$<CONFIG:Debug,RelWithDebInfo>>:-traceback;-check;-debug>"

0 commit comments

Comments
 (0)