Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / hydro / CMakeLists.txt
blob5cf86151494e443d31c6cec7a6f73064067430ca
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)
8 endif()
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)
28 endif()
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
36         hydro_mpp
37         hydro_routing_overland
38         hydro_routing_subsurface
39         hydro_routing_reservoirs
40         hydro_routing_reservoirs_levelpool
41         hydro_routing_reservoirs_hybrid
42         hydro_utils
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
55 # )
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
61 # )
62 # add_dependencies(hydro_routing_groundwater_nhd
63 #         hydro_routing_groundwater
64 #         hydro_routing_groundwater_bucket
65 # )
67 add_dependencies(hydro_driver
68         hydro_routing
69         hydro_debug_utils
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
80         hydro_utils
81         hydro_mpp
82         hydro_debug_utils
83         hydro_routing_overland
84         hydro_routing_subsurface
85         hydro_data_rec
86         hydro_routing
87         hydro_routing_reservoirs_levelpool
88         hydro_routing_reservoirs_hybrid
89         hydro_routing_reservoirs_rfc
90         hydro_routing_reservoirs
91         hydro_wrf_cpl
92         hydro_orchestrator
93         hydro_netcdf_layer
94         hydro_driver