File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,14 @@ endif()
1212
1313# --- compiler options
1414
15- if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
16- # this helps show the options are/aren't conflicting between C and Fortran
17- # at build time
18- string ( APPEND CMAKE_Fortran_FLAGS " - fimplicit-none" )
19- add_compile_options (-Wextra -Wall)
20- endif ()
15+ add_compile_options (
16+ "$<$<COMPILE_LANG_AND_ID:C,GNU>:-mtune=native;-Wall;-Wextra>"
17+ "$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-mtune=native;-Wall;-Wextra>"
18+ "$<$<COMPILE_LANG_AND_ID:Fortran,GNU>:-mtune=native;-Wall;-Wextra;- fimplicit-none>"
19+ "$<$<AND:$<COMPILE_LANG_AND_ID:Fortran,GNU>,$<CONFIG:Release>>:-fno-backtrace;-Wno-maybe-uninitialized>"
20+ "$<$<AND:$<COMPILE_LANG_AND_ID:Fortran,GNU>,$<CONFIG:RelWithDebInfo>>:-Wno-maybe-uninitialized>"
2121
22+ )
2223
2324if (NOT EXISTS ${PROJECT_BINARY_DIR} /.gitignore)
2425 file (WRITE ${PROJECT_BINARY_DIR} /.gitignore "*" )
You can’t perform that action at this time.
0 commit comments