Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / hydro / utils / CMakeLists.txt
blob923017f10d8be536694881c287a87213cb2aaf3b
1 # read version numbers for wrf_hydro_version and nwm_version from
2 # ../.version and ../.nwm_version files
4 file(STRINGS "../.version" WRF_HYDRO_VERSION)
5 if(NWM_META AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.nwm_version)
6         file (STRINGS "../.nwm_version"  NWM_VERSION)
7 else(NWM_META AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.nwm_version)
8         set(NWM_VERSION "undefined")
9 endif()
11 # add the preprocessor definitions for NWM_VERSION and WRF_HYDRO_VERSION
12 # needed to compile module_version.F90
13 add_definitions(-DNWM_VERSION="${NWM_VERSION}")
14 add_definitions(-DWRF_HYDRO_VERSION="${WRF_HYDRO_VERSION}")
16 # build the version static library
17 add_library(hydro_utils STATIC
18         module_version.F90
19         module_hydro_stop.F90