Skip to content

Commit

Permalink
hydro: fixing nudging in the CMake files so flags get passed and depe…
Browse files Browse the repository at this point in the history
…ndencies are set up correctly
  • Loading branch information
scrasmussen committed Mar 1, 2024
1 parent b7d083e commit 7a1ec07
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
14 changes: 8 additions & 6 deletions hydro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ add_subdirectory("Routing")
add_subdirectory("HYDRO_drv")
add_subdirectory("CPL/WRF_cpl")

if (WRF_HYDRO_NUDGING STREQUAL "1")
add_subdirectory("nudging")
add_dependencies(hydro_routing hydro_nudging)
add_dependencies(hydro_driver hydro_nudging)
endif()

# add module dependencies
add_dependencies(hydro_debug_utils hydro_mpp)
add_dependencies(hydro_utils hydro_mpp)
Expand All @@ -37,11 +43,6 @@ add_dependencies(hydro_routing
add_dependencies(hydro_routing_reservoirs_hybrid hydro_routing_reservoirs_levelpool)
add_dependencies(hydro_routing_overland hydro_mpp)

if (WRF_HYDRO_NUDGING STREQUAL "1")
add_dependencies(hydro_driver hydro_nudging)
add_subdirectory("nudging")
endif()

# currently unused Routing/Groundwater directory
# add_subdirectory("Routing/Groundwater")
# add_dependencies(hydro_routing
Expand All @@ -66,7 +67,8 @@ add_dependencies(hydro_driver
hydro_debug_utils
)

add_dependencies(hydro_data_rec hydro_routing_overland
add_dependencies(hydro_data_rec
hydro_routing_overland
hydro_routing_subsurface
hydro_routing_reservoirs
)
Expand Down
12 changes: 8 additions & 4 deletions hydro/OrchestratorLayer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ add_library(hydro_orchestrator STATIC
orchestrator.F90
)

add_dependencies(hydro_orchestrator hydro_netcdf_layer)
add_dependencies(hydro_orchestrator hydro_utils)
add_dependencies(hydro_orchestrator
hydro_netcdf_layer
hydro_utils
)

target_link_libraries(hydro_orchestrator PUBLIC hydro_netcdf_layer)
target_link_libraries(hydro_orchestrator PUBLIC hydro_utils)
target_link_libraries(hydro_orchestrator PRIVATE
hydro_netcdf_layer
hydro_utils
)

0 comments on commit 7a1ec07

Please sign in to comment.