Skip to content

Commit

Permalink
Updates for Spack Support, Round 2
Browse files Browse the repository at this point in the history
Due to insufficient grepping on my part, some remnants of the
"non-canonical" CMake still remain. Apparently these were not necessary
changes for Spack, but they are changes that unify the CMake style of
GEOS to be more like "correct" CMake.

In this go-around, it is mainly finding `INC_ESMF` which I apparently
forgot to grep for last time (I was focused on NetCDF), and some
non-canonical OpenMP calls.

See GEOS-ESM/GEOSgcm#387 for the meta-issue.
  • Loading branch information
mathomp4 committed Mar 21, 2022
1 parent 54e8861 commit ea0cc66
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ if (CMAKE_Fortran_COMPILER_ID MATCHES Intel)
endif ()
endif ()
if (CMAKE_BUILD_TYPE MATCHES Release)
set_source_files_properties( GMI_GridComp/GmiChem_GridCompMod.F90
set_source_files_properties( GMI_GridComp/GmiChem_GridCompMod.F90
PROPERTIES COMPILE_FLAGS "-O2 ${common_Fortran_flags} ${GEOS_Fortran_Release_FPE_Flags} ${ALIGNCOM}")
set_source_files_properties( GMI_GridComp/GmiChem_GridCompClassMod.F90
PROPERTIES COMPILE_FLAGS "-O1 ${common_Fortran_flags} ${GEOS_Fortran_Release_FPE_Flags} ${ALIGNCOM}")
endif ()



esma_add_library (${this} SRCS ${srcs} DEPENDENCIES Chem_Shared GEOS_Shared)
esma_add_library (${this} SRCS ${srcs} DEPENDENCIES Chem_Shared GEOS_Shared esmf)

target_include_directories (${this}
PUBLIC
Expand All @@ -83,7 +83,6 @@ target_include_directories (${this}
)

target_include_directories (${this} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/GMI_GridComp>)
target_include_directories (${this} PUBLIC ${INC_ESMF})



Expand Down Expand Up @@ -142,7 +141,7 @@ add_dependencies (${this} phony_gmi)
# OUTPUT something
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/gmi_acg.pl -v
# MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/gmi_acg.pl
# DEPENDS
# DEPENDS
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
# COMMENT "2nd stage generation of automatic code in GMI"
# )
Expand Down

0 comments on commit ea0cc66

Please sign in to comment.