Skip to content

Commit 4720446

Browse files
committed
v11: Support for GCC 15
1 parent f4cdac6 commit 4720446

File tree

1 file changed

+13
-0
lines changed
  • GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp

1 file changed

+13
-0
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ if (CMAKE_Fortran_COMPILER_ID MATCHES Intel AND CMAKE_BUILD_TYPE MATCHES Release
3232
# set_source_files_properties(GEOS_MGB2_2M_InterfaceMod.F90 PROPERTIES COMPILE_OPTIONS ${FOPT1})
3333
endif ()
3434

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})
37+
# There is some odd interaction between GCC 15 and the GF code. FPEs
38+
# that do not occur with GCC 14 or earlier. For now, we compile GF
39+
# codes with -O1 which seems to avoid the bad instruction. Tests show
40+
# not much of a speed difference with GCC 14
41+
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 15)
42+
message (STATUS "[GCC15+] Setting GF Code to use -O1 for GCC 15")
43+
set_source_files_properties(ConvPar_GF2020.F90 PROPERTIES COMPILE_OPTIONS ${FOPT1})
44+
set_source_files_properties(ConvPar_GF_GEOS5.F90 PROPERTIES COMPILE_OPTIONS ${FOPT1})
45+
endif()
46+
endif ()
47+
3548
esma_add_library (${this}
3649
SRCS ${srcs}
3750
DEPENDENCIES GEOS_Shared GMAO_mpeu MAPL Chem_Shared Chem_Base ESMF::ESMF)

0 commit comments

Comments
 (0)