Skip to content

Commit 3405efa

Browse files
authored
Merge pull request #291 from GEOS-ESM/develop
2 parents 4f6c0a9 + bc542b6 commit 3405efa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if (BUILD_GEOS_GTFV3_INTERFACE)
3333
message(STATUS "Building GEOS-gtFV3 interface")
3434

3535
add_definitions(-DRUN_GTFV3)
36-
36+
3737
# The Python library creation requires mpiexec/mpirun to run on a
3838
# compute node. Probably a weird SLURM thing?
3939
find_package(MPI REQUIRED)
@@ -124,6 +124,12 @@ endif ()
124124
if (FV_PRECISION STREQUAL R4)
125125
set (GFDL fms_r4)
126126
elseif (FV_PRECISION STREQUAL R4R8) # FV is R4 but FMS is R8
127+
# We need to add_dependencies for fms_r4 because CMake doesn't know we
128+
# need it for include purposes. In R4R8, we only ever link against
129+
# fms_r4, so it doesn't know we need to build it.
130+
# NOTE NOTE NOTE: This should *not* be included in GEOSgcm v12
131+
# because FMS is pre-built library in that case.
132+
add_dependencies (${this} fms_r4)
127133
get_target_property (extra_incs fms_r4 INTERFACE_INCLUDE_DIRECTORIES)
128134
target_include_directories(${this} PRIVATE
129135
$<BUILD_INTERFACE:${extra_incs}>

0 commit comments

Comments
 (0)