1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
set(
CMAKE_Fortran_FLAGS_INIT
"-fimplicit-none"
"-ffree-line-length-132"
)
set(
CMAKE_Fortran_FLAGS_RELEASE_INIT
)
set(
CMAKE_Fortran_FLAGS_DEBUG_INIT
"-Wall"
"-Wextra"
"-Wimplicit-procedure"
"-std=f2018"
)
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
set(
CMAKE_Fortran_FLAGS_INIT
)
set(
CMAKE_Fortran_FLAGS_RELEASE_INIT
)
if(WIN32)
set(
CMAKE_Fortran_FLAGS_DEBUG_INIT
"/stand:f18"
"/warn:declarations,general,usage,interfaces,unused"
)
else()
set(
CMAKE_Fortran_FLAGS_DEBUG_INIT
"-stand f18"
"-warn declarations,general,usage,interfaces,unused"
)
endif()
else()
set(
CMAKE_Fortran_FLAGS_INIT
)
set(
CMAKE_Fortran_FLAGS_RELEASE_INIT
)
set(
CMAKE_Fortran_FLAGS_DEBUG_INIT
)
endif()
string(REPLACE ";" " " CMAKE_Fortran_FLAGS_INIT "${CMAKE_Fortran_FLAGS_INIT}")
string(REPLACE ";" " " CMAKE_Fortran_FLAGS_RELEASE_INIT "${CMAKE_Fortran_FLAGS_RELEASE_INIT}")
string(REPLACE ";" " " CMAKE_Fortran_FLAGS_DEBUG_INIT "${CMAKE_Fortran_FLAGS_DEBUG_INIT}")
|