Skip to content

Commit e692076

Browse files
committed
Changes to compile the library for coupled models
1 parent f610e3c commit e692076

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@ if(CABLE_LIBRARY)
120120
src/util/cable_climate_type_mod.F90
121121
src/util/masks_cbl.F90
122122
)
123+
target_compile_definitions(cable PRIVATE UM_CBL)
124+
target_include_directories(cable PUBLIC "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
125+
126+
install(TARGETS cable
127+
EXPORT CABLEFortranTargets
128+
LIBRARY DESTINATION lib
129+
INCLUDES DESTINATION include)
130+
131+
install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/ TYPE INCLUDE)
123132

124133
if(CABLE_LIBRARY_TARGET STREQUAL "access-esm1.6")
125134
list(APPEND SOURCES

build.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ while [ ${#} -gt 0 ]; do
6464
cmake_args+=(-DCABLE_MPI="ON")
6565
;;
6666
-l|--library)
67-
build_args+=(--target cable_science)
67+
build_args+=(--target cable)
6868
cmake_args+=(-DCABLE_LIBRARY="ON")
6969
cmake_args+=(-DCABLE_LIBRARY_TARGET="${2}")
7070
do_install=0 # Disable installation when only building the science library

0 commit comments

Comments
 (0)