Skip to content

Commit 1571e9f

Browse files
danrosen25rcabell
authored andcommitted
Fix CMake when NWM_META=1
* fix cmake reference to .nwm_version file
1 parent 0ea0b10 commit 1571e9f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

trunk/NDHMS/utils/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ cmake_minimum_required (VERSION 2.8)
33
# read version numbers for wrf_hydro_version and nwm_version from
44
# ../.version and ../.nwm_version
55
file (STRINGS "../.version" WRF_HYDRO_VERSION)
6-
if (NWM_META)
6+
if (NWM_META AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.nwm_version)
77
file (STRINGS "../.nwm_version" NWM_VERSION)
8-
else (NWM_META)
9-
set(NWM_VERSION "none")
10-
endif (NWM_META)
8+
else (NWM_META AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.nwm_version)
9+
set(NWM_VERSION "undefined")
10+
endif (NWM_META AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.nwm_version)
1111

1212
# add the preprocessor definitions for NWM_VERSION and WRF_HYDRO_VERSION
1313
# needed to compile module_version.F

0 commit comments

Comments
 (0)