@@ -22,18 +22,7 @@ if (CMAKE_Fortran_COMPILER_ID MATCHES Intel AND CMAKE_BUILD_TYPE MATCHES Aggress
2222endif ()
2323
2424if (CMAKE_Fortran_COMPILER_ID MATCHES GNU AND CMAKE_BUILD_TYPE MATCHES Release)
25- string (REPLACE "${FOPT3} " "${FOPT2} " CMAKE_Fortran_FLAGS_RELEASE ${CMAKE_Fortran_FLAGS_RELEASE} )
26- endif ()
27-
28- # Note For unknown reasons, BACM_1M_Interface takes 20 minutes to compile at O3
29- # and 10 minutes at O2. But only 7 seconds with O1. So we compile at O1
30- if (CMAKE_Fortran_COMPILER_ID MATCHES Intel AND CMAKE_BUILD_TYPE MATCHES Release)
31- set_source_files_properties (GEOS_BACM_1M_InterfaceMod.F90 PROPERTIES COMPILE_OPTIONS ${FOPT1} )
32- # set_source_files_properties(GEOS_MGB2_2M_InterfaceMod.F90 PROPERTIES COMPILE_OPTIONS ${FOPT1})
33- endif ()
34-
35- if (CMAKE_Fortran_COMPILER_ID MATCHES GNU AND CMAKE_BUILD_TYPE MATCHES Release)
36- set_source_files_properties (GEOS_BACM_1M_InterfaceMod.F90 PROPERTIES COMPILE_OPTIONS ${FOPT1} )
25+ string (REPLACE "${FOPT3} " "${FOPT2} " CMAKE_Fortran_FLAGS_RELEASE ${CMAKE_Fortran_FLAGS_RELEASE} )
3726 # There is some odd interaction between GCC 15 and the GF code. FPEs
3827 # that do not occur with GCC 14 or earlier. For now, we compile GF
3928 # codes with -O1 which seems to avoid the bad instruction. Tests show
@@ -45,6 +34,13 @@ if (CMAKE_Fortran_COMPILER_ID MATCHES GNU AND CMAKE_BUILD_TYPE MATCHES Release)
4534 endif ()
4635endif ()
4736
37+ # Note For unknown reasons, BACM_1M_Interface takes 20 minutes to compile at O3
38+ # and 10 minutes at O2. But only 7 seconds with O1. So we compile at O1
39+ if (CMAKE_Fortran_COMPILER_ID MATCHES Intel AND CMAKE_BUILD_TYPE MATCHES Release)
40+ set_source_files_properties (GEOS_BACM_1M_InterfaceMod.F90 PROPERTIES COMPILE_OPTIONS ${FOPT1} )
41+ # set_source_files_properties(GEOS_MGB2_2M_InterfaceMod.F90 PROPERTIES COMPILE_OPTIONS ${FOPT1})
42+ endif ()
43+
4844esma_add_library (${this}
4945 SRCS ${srcs}
5046 DEPENDENCIES GEOS_Shared GMAO_mpeu MAPL Chem_Shared Chem_Base ESMF::ESMF)
0 commit comments