From 4c0bb1d1a0fd92e23c3728f69c931bfeee67e24c Mon Sep 17 00:00:00 2001 From: George Gayno Date: Fri, 8 May 2020 19:05:24 +0000 Subject: [PATCH] feature/cmake This commit references #91. Move Intel compilation flags to root level CmakeLists.txt file. --- CMakeLists.txt | 18 ++++++++++++++++++ sorc/chgres_cube.fd/CMakeLists.txt | 6 +----- sorc/emcsfc_ice_blend.fd/CMakeLists.txt | 8 +------- sorc/emcsfc_snow2mdl.fd/CMakeLists.txt | 6 +----- sorc/fre-nctools.fd/shared_lib/CMakeLists.txt | 10 ---------- .../tools/filter_topo/CMakeLists.txt | 6 +----- .../tools/fregrid/CMakeLists.txt | 11 ----------- .../tools/make_hgrid/CMakeLists.txt | 11 ----------- .../tools/make_solo_mosaic/CMakeLists.txt | 10 ---------- .../tools/shave.fd/CMakeLists.txt | 8 +------- sorc/global_chgres.fd/CMakeLists.txt | 6 +----- sorc/global_cycle.fd/CMakeLists.txt | 6 +----- sorc/mkgfsnemsioctl.fd/CMakeLists.txt | 8 +------- sorc/nemsio_chgdate.fd/CMakeLists.txt | 6 +----- sorc/nemsio_get.fd/CMakeLists.txt | 6 +----- sorc/nemsio_read.fd/CMakeLists.txt | 8 +------- sorc/nst_tf_chg.fd/CMakeLists.txt | 6 +----- sorc/orog.fd/CMakeLists.txt | 6 +----- sorc/sfc_climo_gen.fd/CMakeLists.txt | 6 +----- 19 files changed, 32 insertions(+), 120 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 757259c6a..de75274c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,24 @@ if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Intel|GNU)$") message(WARNING "Compiler not officially supported: ${CMAKE_C_COMPILER_ID}") endif() +if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") + set(CMAKE_Fortran_FLAGS "-g -traceback") + set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise") + set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check -check noarg_temp_created -check nopointer -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv") +elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") + set(CMAKE_Fortran_FLAGS "-g -fbacktrace") +endif() + +if(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$") + set(CMAKE_C_FLAGS "-g -traceback") + set(CMAKE_C_FLAGS_RELEASE "-O2") + set(CMAKE_C_FLAGS_DEBUG "-O0") +elseif(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") + set(CMAKE_C_FLAGS " ") + set(CMAKE_C_FLAGS_RELEASE " ") + set(CMAKE_C_FLAGS_DEBUG " ") +endif() + find_package(PNG REQUIRED) find_package(ZLIB REQUIRED) find_package(Jasper REQUIRED) diff --git a/sorc/chgres_cube.fd/CMakeLists.txt b/sorc/chgres_cube.fd/CMakeLists.txt index 70e11e8d9..22d70c666 100644 --- a/sorc/chgres_cube.fd/CMakeLists.txt +++ b/sorc/chgres_cube.fd/CMakeLists.txt @@ -12,11 +12,7 @@ set(fortran_src write_data.F90) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback -r8 -convert big_endian -assume byterecl") - set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -convert big_endian -assume byterecl") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-line-length-0 -fdefault-real-8 -fconvert=big-endian") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") diff --git a/sorc/emcsfc_ice_blend.fd/CMakeLists.txt b/sorc/emcsfc_ice_blend.fd/CMakeLists.txt index b880070fb..e5393e7ff 100644 --- a/sorc/emcsfc_ice_blend.fd/CMakeLists.txt +++ b/sorc/emcsfc_ice_blend.fd/CMakeLists.txt @@ -1,13 +1,7 @@ set(fortran_src emcsfc_ice_blend.f90) -if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback") - set(CMAKE_Fortran_FLAGS_RELEASE "-O0") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) -elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") +if(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-line-length-0") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") set(CMAKE_Fortran_FLAGS_DEBUG diff --git a/sorc/emcsfc_snow2mdl.fd/CMakeLists.txt b/sorc/emcsfc_snow2mdl.fd/CMakeLists.txt index 950a37224..12d95542d 100644 --- a/sorc/emcsfc_snow2mdl.fd/CMakeLists.txt +++ b/sorc/emcsfc_snow2mdl.fd/CMakeLists.txt @@ -7,11 +7,7 @@ set(fortran_src snowdat.f) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback -r8 -FR -convert big_endian -assume byterecl") - set(CMAKE_Fortran_FLAGS_RELEASE "-O0") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -FR -convert big_endian -assume byterecl") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-form -ffree-line-length-0 -fdefault-real-8 -fconvert=big-endian") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") diff --git a/sorc/fre-nctools.fd/shared_lib/CMakeLists.txt b/sorc/fre-nctools.fd/shared_lib/CMakeLists.txt index 6bed487f0..6d19e3036 100644 --- a/sorc/fre-nctools.fd/shared_lib/CMakeLists.txt +++ b/sorc/fre-nctools.fd/shared_lib/CMakeLists.txt @@ -10,16 +10,6 @@ set(c_src read_mosaic.c tool_util.c) -if(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_C_FLAGS "-traceback") - set(CMAKE_C_FLAGS_RELEASE "-O2") - set(CMAKE_C_FLAGS_DEBUG "-O0") -elseif(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") - set(CMAKE_C_FLAGS " ") - set(CMAKE_C_FLAGS_RELEASE " ") - set(CMAKE_C_FLAGS_DEBUG " ") -endif() - add_library(shared_lib STATIC ${c_src}) target_compile_definitions(shared_lib PRIVATE use_netCDF) diff --git a/sorc/fre-nctools.fd/tools/filter_topo/CMakeLists.txt b/sorc/fre-nctools.fd/tools/filter_topo/CMakeLists.txt index d99c02ee0..00fde0b33 100644 --- a/sorc/fre-nctools.fd/tools/filter_topo/CMakeLists.txt +++ b/sorc/fre-nctools.fd/tools/filter_topo/CMakeLists.txt @@ -2,11 +2,7 @@ set(fortran_src filter_topo.F90) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback -assume byterecl -real_size 64") - set(CMAKE_Fortran_FLAGS_RELEASE "-fltconsistency -fno-alias -stack_temps -safe_cray_ptr -ftz -O2") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -assume byterecl -real_size 64 -fno-alias -stack_temps -safe_cray_ptr -ftz") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-line-length-0 -fdefault-real-8") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") diff --git a/sorc/fre-nctools.fd/tools/fregrid/CMakeLists.txt b/sorc/fre-nctools.fd/tools/fregrid/CMakeLists.txt index 9dc0f3d78..f376313c6 100644 --- a/sorc/fre-nctools.fd/tools/fregrid/CMakeLists.txt +++ b/sorc/fre-nctools.fd/tools/fregrid/CMakeLists.txt @@ -4,17 +4,6 @@ set(c_src fregrid.c fregrid_util.c) -if(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_C_FLAGS "-traceback") - set(CMAKE_C_FLAGS_RELEASE "-O2") - set(CMAKE_C_FLAGS_DEBUG "-O0") - -elseif(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") - set(CMAKE_C_FLAGS " ") - set(CMAKE_C_FLAGS_RELEASE " ") - set(CMAKE_C_FLAGS_DEBUG " ") -endif() - add_executable(fregrid ${c_src}) target_link_libraries(fregrid diff --git a/sorc/fre-nctools.fd/tools/make_hgrid/CMakeLists.txt b/sorc/fre-nctools.fd/tools/make_hgrid/CMakeLists.txt index bcf33a6dc..c59be2dee 100644 --- a/sorc/fre-nctools.fd/tools/make_hgrid/CMakeLists.txt +++ b/sorc/fre-nctools.fd/tools/make_hgrid/CMakeLists.txt @@ -5,17 +5,6 @@ set(c_src create_lonlat_grid.c make_hgrid.c) -if(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_C_FLAGS "-traceback") - set(CMAKE_C_FLAGS_RELEASE "-O2") - set(CMAKE_C_FLAGS_DEBUG "-O0") - -elseif(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") - set(CMAKE_C_FLAGS " ") - set(CMAKE_C_FLAGS_RELEASE " ") - set(CMAKE_C_FLAGS_DEBUG " ") -endif() - add_executable(make_hgrid ${c_src}) target_link_libraries(make_hgrid diff --git a/sorc/fre-nctools.fd/tools/make_solo_mosaic/CMakeLists.txt b/sorc/fre-nctools.fd/tools/make_solo_mosaic/CMakeLists.txt index 907e13c81..87ef6bed2 100644 --- a/sorc/fre-nctools.fd/tools/make_solo_mosaic/CMakeLists.txt +++ b/sorc/fre-nctools.fd/tools/make_solo_mosaic/CMakeLists.txt @@ -2,16 +2,6 @@ set(c_src make_solo_mosaic.c get_contact.c) -if(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_C_FLAGS "-g -traceback") - set(CMAKE_C_FLAGS_RELEASE "-O2") - set(CMAKE_C_FLAGS_DEBUG "-O0") -elseif(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") - set(CMAKE_C_FLAGS " ") - set(CMAKE_C_FLAGS_RELEASE " ") - set(CMAKE_C_FLAGS_DEBUG " ") -endif() - add_executable(make_solo_mosaic ${c_src}) target_link_libraries(make_solo_mosaic diff --git a/sorc/fre-nctools.fd/tools/shave.fd/CMakeLists.txt b/sorc/fre-nctools.fd/tools/shave.fd/CMakeLists.txt index fc62828c5..b590076fd 100644 --- a/sorc/fre-nctools.fd/tools/shave.fd/CMakeLists.txt +++ b/sorc/fre-nctools.fd/tools/shave.fd/CMakeLists.txt @@ -1,13 +1,7 @@ set(fortran_src shave_nc.F90) -if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback") - set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) -elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") +if(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-line-length-0") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") set(CMAKE_Fortran_FLAGS_DEBUG diff --git a/sorc/global_chgres.fd/CMakeLists.txt b/sorc/global_chgres.fd/CMakeLists.txt index 2d3cd66df..4ba5059d9 100644 --- a/sorc/global_chgres.fd/CMakeLists.txt +++ b/sorc/global_chgres.fd/CMakeLists.txt @@ -13,11 +13,7 @@ set(fortran_src surface_chgres.f90) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback -r8 -convert big_endian") - set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -convert big_endian") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-line-length-0 -fdefault-real-8 -fconvert=big-endian") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") diff --git a/sorc/global_cycle.fd/CMakeLists.txt b/sorc/global_cycle.fd/CMakeLists.txt index 35bbb53dc..87ac038cf 100644 --- a/sorc/global_cycle.fd/CMakeLists.txt +++ b/sorc/global_cycle.fd/CMakeLists.txt @@ -6,11 +6,7 @@ set(fortran_src read_write_data.f90) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback -r8 -convert big_endian") - set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -convert big_endian") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-line-length-0 -fdefault-real-8 -fconvert=big-endian") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") diff --git a/sorc/mkgfsnemsioctl.fd/CMakeLists.txt b/sorc/mkgfsnemsioctl.fd/CMakeLists.txt index 7f7b592cb..2c6903df9 100644 --- a/sorc/mkgfsnemsioctl.fd/CMakeLists.txt +++ b/sorc/mkgfsnemsioctl.fd/CMakeLists.txt @@ -1,13 +1,7 @@ set(fortran_src mkgfsnemsioctl.f90) -if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback") - set(CMAKE_Fortran_FLAGS_RELEASE "-O0") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) -elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") +if(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") set(CMAKE_Fortran_FLAGS_DEBUG diff --git a/sorc/nemsio_chgdate.fd/CMakeLists.txt b/sorc/nemsio_chgdate.fd/CMakeLists.txt index 6037a1f34..90ed5b444 100644 --- a/sorc/nemsio_chgdate.fd/CMakeLists.txt +++ b/sorc/nemsio_chgdate.fd/CMakeLists.txt @@ -2,11 +2,7 @@ set(fortran_src nemsio_chgdate.f90) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback -convert big_endian") - set(CMAKE_Fortran_FLAGS_RELEASE "-O0") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -convert big_endian") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") diff --git a/sorc/nemsio_get.fd/CMakeLists.txt b/sorc/nemsio_get.fd/CMakeLists.txt index a8f254ab1..cd41d0034 100644 --- a/sorc/nemsio_get.fd/CMakeLists.txt +++ b/sorc/nemsio_get.fd/CMakeLists.txt @@ -2,11 +2,7 @@ set(fortran_src nemsio_get.f90) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback -convert big_endian") - set(CMAKE_Fortran_FLAGS_RELEASE "-O0") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -convert big_endian") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") diff --git a/sorc/nemsio_read.fd/CMakeLists.txt b/sorc/nemsio_read.fd/CMakeLists.txt index 33188582a..a443e8fcb 100644 --- a/sorc/nemsio_read.fd/CMakeLists.txt +++ b/sorc/nemsio_read.fd/CMakeLists.txt @@ -1,13 +1,7 @@ set(fortran_src nemsio_read.f90) -if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback") - set(CMAKE_Fortran_FLAGS_RELEASE "-O0") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) -elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") +if(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") set(CMAKE_Fortran_FLAGS_DEBUG diff --git a/sorc/nst_tf_chg.fd/CMakeLists.txt b/sorc/nst_tf_chg.fd/CMakeLists.txt index 0b80e811d..8cd6685bb 100644 --- a/sorc/nst_tf_chg.fd/CMakeLists.txt +++ b/sorc/nst_tf_chg.fd/CMakeLists.txt @@ -7,11 +7,7 @@ set(fortran_src smth9_msk.f90) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback -r8") - set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-line-length-0 -fdefault-real-8") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") diff --git a/sorc/orog.fd/CMakeLists.txt b/sorc/orog.fd/CMakeLists.txt index d77e46828..6262b6a5a 100644 --- a/sorc/orog.fd/CMakeLists.txt +++ b/sorc/orog.fd/CMakeLists.txt @@ -3,11 +3,7 @@ set(fortran_src netcdf_io.F90) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback -r8 -convert big_endian -assume byterecl") - set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -convert big_endian -assume byterecl") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-line-length-0 -fdefault-real-8 -fconvert=big-endian -fno-range-check") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") diff --git a/sorc/sfc_climo_gen.fd/CMakeLists.txt b/sorc/sfc_climo_gen.fd/CMakeLists.txt index b1cdbeb50..8819bd361 100644 --- a/sorc/sfc_climo_gen.fd/CMakeLists.txt +++ b/sorc/sfc_climo_gen.fd/CMakeLists.txt @@ -9,11 +9,7 @@ set(fortran_src utils.f90) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -traceback -r8 -convert big_endian") - set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise") - set(CMAKE_Fortran_FLAGS_DEBUG - "-O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv" - ) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -convert big_endian") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-line-length-0 -fdefault-real-8 -fconvert=big-endian") set(CMAKE_Fortran_FLAGS_RELEASE "-O3")