Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build time option for ocean model #57

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@ esma_set_this ()

#target_include_directories (${this} PUBLIC ${INC_ESMF} ${INC_NETCDF})

option (BUILD_MIT_OCEAN "BUILD_MIT_OCEAN is turned off by default" OFF) #OFF by default
if ( NOT BUILD_MIT_OCEAN )
esma_add_library (${this}
SRCS GEOS_OceanGridComp.F90
SUBCOMPONENTS MOM6_GEOSPlug MOM_GEOS5PlugMod GEOSdatasea_GridComp
DEPENDENCIES GEOSdatasea_GridComp MAPL esmf)

if (GEOS_OCEAN STREQUAL MOM5)
set (ocean_plug MOM_GEOSPlugMod)
elseif(GEOS_OCEAN STREQUAL MOM6)
set (ocean_plug MOM6_GEOSPlug)
elseif(GEOS_OCEAN STREQUAL MIT)
set (ocean_plug MIT_GEOS5PlugMod)
elseif(GEOS_OCEAN STREQUAL datasea)
# no real ocean model, just datasea
else()
add_compile_definitions(BUILD_MIT_OCEAN)
esma_add_library (${this}
SRCS GEOS_OceanGridComp.F90
SUBCOMPONENTS MIT_GEOS5PlugMod GEOSdatasea_GridComp
DEPENDENCIES GEOSdatasea_GridComp MAPL
INCLUDES ${INC_ESMF})
message (FATAL_ERROR "Invalid ocean model selection: ${GEOS_OCEAN}")
endif()
#option (BUILD_MIT_OCEAN "BUILD_MIT_OCEAN is turned off by default" OFF) #OFF by default
#if ( NOT GEOS_OCEAN EQUAL "MIT")
esma_add_library (${this}
SRCS GEOS_OceanGridComp.F90
SUBCOMPONENTS ${ocean_plug} GEOSdatasea_GridComp
DEPENDENCIES GEOSdatasea_GridComp MAPL esmf)

# Note to SA: If Fahad has problems then add back this logic.

mapl_acg (${this} GEOS_Ocean_StateSpecs.rc
IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS
Expand Down
Loading