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")
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