1 # additions that WRF-Hydro's top CMakeLists.txt handles
2 add_compile_options( "${PROJECT_COMPILE_OPTIONS}" )
3 add_compile_definitions( "${PROJECT_COMPILE_DEFINITIONS}" )
4 set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/hydro/mods)
5 add_definitions(-DMPP_LAND)
6 if (WRF_HYDRO_NUDGING STREQUAL "1")
7 add_definitions(-DWRF_HYDRO_NUDGING=1)
10 # build the various sup-projects
11 add_subdirectory("MPP")
12 add_subdirectory("utils")
13 add_subdirectory("IO")
14 add_subdirectory("OrchestratorLayer")
15 add_subdirectory("Debug_Utilities")
16 add_subdirectory("Routing/Overland")
17 add_subdirectory("Routing/Subsurface")
18 add_subdirectory("Routing/Reservoirs")
19 add_subdirectory("Data_Rec")
20 add_subdirectory("Routing")
21 add_subdirectory("HYDRO_drv")
22 add_subdirectory("CPL/WRF_cpl")
24 if (WRF_HYDRO_NUDGING STREQUAL "1")
25 add_subdirectory("nudging")
26 add_dependencies(hydro_routing hydro_nudging)
27 add_dependencies(hydro_driver hydro_nudging)
30 # add module dependencies
31 add_dependencies(hydro_debug_utils hydro_mpp)
32 add_dependencies(hydro_utils hydro_mpp)
33 add_dependencies(hydro_orchestrator hydro_netcdf_layer)
35 add_dependencies(hydro_routing
37 hydro_routing_overland
38 hydro_routing_subsurface
39 hydro_routing_reservoirs
40 hydro_routing_reservoirs_levelpool
41 hydro_routing_reservoirs_hybrid
45 add_dependencies(hydro_routing_reservoirs_hybrid hydro_routing_reservoirs_levelpool)
46 add_dependencies(hydro_routing_overland hydro_mpp)
48 # currently unused Routing/Groundwater directory
49 # add_subdirectory("Routing/Groundwater")
50 # add_dependencies(hydro_routing
51 # hydro_routing_groundwater
52 # hydro_routing_groundwater_bucket
53 # hydro_routing_groundwater_nhd
54 # hydro_routing_groundwater_simple
56 # add_dependencies(hydro_routing_groundwater hydro_mpp)
57 # add_dependencies(hydro_routing_groundwater_bucket hydro_routing_groundwater)
58 # add_dependencies(hydro_routing_groundwater_simple
59 # hydro_routing_groundwater
60 # hydro_routing_groundwater_bucket
62 # add_dependencies(hydro_routing_groundwater_nhd
63 # hydro_routing_groundwater
64 # hydro_routing_groundwater_bucket
67 add_dependencies(hydro_driver
72 add_dependencies(hydro_data_rec
73 hydro_routing_overland
74 hydro_routing_subsurface
75 hydro_routing_reservoirs
78 add_library(wrfhydro INTERFACE)
79 target_link_libraries(wrfhydro INTERFACE
83 hydro_routing_overland
84 hydro_routing_subsurface
87 hydro_routing_reservoirs_levelpool
88 hydro_routing_reservoirs_hybrid
89 hydro_routing_reservoirs_rfc
90 hydro_routing_reservoirs