diff --git a/CMakeLists.txt b/CMakeLists.txt index 0035c40..a1ca69f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ if (BUILD_GEOS_GTFV3_INTERFACE) message(STATUS "Building GEOS-gtFV3 interface") add_definitions(-DRUN_GTFV3) - + # The Python library creation requires mpiexec/mpirun to run on a # compute node. Probably a weird SLURM thing? find_package(MPI REQUIRED) @@ -124,6 +124,12 @@ endif () if (FV_PRECISION STREQUAL R4) set (GFDL fms_r4) elseif (FV_PRECISION STREQUAL R4R8) # FV is R4 but FMS is R8 + # We need to add_dependencies for fms_r4 because CMake doesn't know we + # need it for include purposes. In R4R8, we only ever link against + # fms_r4, so it doesn't know we need to build it. + # NOTE NOTE NOTE: This should *not* be included in GEOSgcm v12 + # because FMS is pre-built library in that case. + add_dependencies (${this} fms_r4) get_target_property (extra_incs fms_r4 INTERFACE_INCLUDE_DIRECTORIES) target_include_directories(${this} PRIVATE $