From b498916c5ae2050d3b69050bf5b83753bc9dd506 Mon Sep 17 00:00:00 2001 From: Dilawar Singh <dilawars@ncbs.res.in> Date: Fri, 21 Apr 2017 16:12:28 +0530 Subject: [PATCH] VERSION string is fixed to today's date if not given. --- moose-core/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/moose-core/CMakeLists.txt b/moose-core/CMakeLists.txt index 390904c5..7e4a21d1 100644 --- a/moose-core/CMakeLists.txt +++ b/moose-core/CMakeLists.txt @@ -31,7 +31,12 @@ if( (NOT MOOSE_VERSION) AND GIT_EXEC) file(WRITE ${VERSION_FILE} ${MOOSE_VERSION}) elseif( (NOT MOOSE_VERSION) AND (NOT GIT_EXEC) ) message(STATUS "+ Reading ${VERSION_FILE}" ) - file(READ ${VERSION_FILE} GIT_VERSION_OUTPUT ) + if(EXISTS ${VERSION_FILE} ) + file(READ ${VERSION_FILE} MOOSE_VERSION ) + else() + string(TIMESTAMP MOOSE_VERSION "nightly-%Y%m%d" ) + set(GIT_VERSION_OUTPUT "nightly" ) + endif( ) elseif(MOOSE_VERSION) message(STATUS "+ Using user specified VERSION = ${MOOSE_VERSION}" ) file(WRITE ${VERSION_FILE} ${MOOSE_VERSION}) -- GitLab