Skip to content

Commit d4cec55

Browse files
committed
correct compiler options:
1 parent 91a8d07 commit d4cec55

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmake/compilers.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
if(NOT MSVC)
2-
add_compile_options(-Wall)
2+
add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wall>)
3+
endif()
4+
5+
if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
6+
add_compile_options($<$<COMPILE_LANGUAGE:Fortran>:-Wall>)
7+
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
8+
add_compile_options($<$<COMPILE_LANGUAGE:Fortran>:-warn>)
39
endif()

0 commit comments

Comments
 (0)