@@ -13,12 +13,17 @@ endif()
1313# --- compiler options
1414# we left off "-std=f2018" type flags as they tend to issue false warnings
1515
16+ if (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel" )
1617add_compile_options (
17- $<$<C_COMPILER_ID:Intel,IntelLLVM>:$<IF:$<BOOL :${WIN32} >,/QxHost,-xHost>>
18- "$<$<COMPILE_LANG_AND_ID:Fortran,Intel,IntelLLVM>:-warn;-heap-arrays>"
19- "$<$<AND:$<COMPILE_LANG_AND_ID:Fortran,Intel,IntelLLVM>,$<CONFIG:Debug,RelWithDebInfo>>:-traceback;-check;-debug>"
20- "$<$<COMPILE_LANG_AND_ID:Fortran,GNU>:-mtune=native;-Wall;-fimplicit-none>"
21- "$<$<AND:$<COMPILE_LANG_AND_ID:Fortran,GNU>,$<CONFIG:Debug,RelWithDebInfo>>:-Wextra;-fcheck=all;-Werror=array-bounds>"
22- "$<$<AND:$<COMPILE_LANG_AND_ID:Fortran,GNU>,$<CONFIG:Release>>:-fno-backtrace;-Wno-maybe-uninitialized>"
23- "$<$<AND:$<COMPILE_LANG_AND_ID:Fortran,GNU>,$<CONFIG:RelWithDebInfo>>:-Wno-maybe-uninitialized>"
18+ $<IF:$<BOOL :${WIN32} >,/QxHost,-xHost>
19+ "$<$<COMPILE_LANGUAGE:Fortran>:-warn;-heap-arrays>"
20+ "$<$<AND:$<COMPILE_LANGUAGE:Fortran>,$<CONFIG:Debug,RelWithDebInfo>>:-traceback;-check;-debug>"
2421)
22+ elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" )
23+ add_compile_options (
24+ "$<$<COMPILE_LANGUAGE:Fortran>:-mtune=native;-Wall;-fimplicit-none>"
25+ "$<$<AND:$<COMPILE_LANGUAGE:Fortran>,$<CONFIG:Debug,RelWithDebInfo>>:-Wextra;-fcheck=all;-Werror=array-bounds>"
26+ "$<$<AND:$<COMPILE_LANGUAGE:Fortran>,$<CONFIG:Release>>:-fno-backtrace;-Wno-maybe-uninitialized>"
27+ "$<$<AND:$<COMPILE_LANGUAGE:Fortran>,$<CONFIG:RelWithDebInfo>>:-Wno-maybe-uninitialized>"
28+ )
29+ endif ()
0 commit comments