Skip to content

Commit

Permalink
Add option for multiple WW3 caps (ufs-community#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgerheiser authored Mar 17, 2022
1 parent 4fc5d72 commit e412040
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,15 @@ endif()
### Wave components [WW3]
###############################################################################
if(WW3)
# Set options for WW3 build
set(SWITCH "multi_esmf" CACHE STRING "Default to switch_multi_esmf")
set(MULTI_ESMF ON CACHE BOOL "Enable ESMF for WW3")
if()
set(SWITCH "multi_esmf")
set(UFS_CAP "MULTI_ESMF" CACHE STRING "Build with MULTI_ESMF cap")
list(APPEND _ufs_defs_private FRONT_WW3=WMESMFMD)
else()
set(SWITCH "meshcap")
set(UFS_CAP "NUOPC_MESH" CACHE STRING "Build with NUOPC_MESH cap")
list(APPEND _ufs_defs_private FRONT_WW3=wav_comp_nuopc)
endif()
add_subdirectory(WW3)
endif()

Expand Down Expand Up @@ -214,7 +220,6 @@ if(WW3)
# list(APPEND _ufs_defs_private FRONT_WW3=wav_comp_nuopc)
# target_include_directories(ufs PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/WW3/model/mod)
# list(APPEND _ufs_libs_public ${WW3_LIBS})
list(APPEND _ufs_defs_private FRONT_WW3=WMESMFMD)
target_link_libraries(ufs PUBLIC WW3::WW3)
endif()

Expand Down

0 comments on commit e412040

Please sign in to comment.