From e8adc21fdb3e57b8e04a7e9d5eeea695e6c3a3a3 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Tue, 2 May 2017 17:52:07 +0200 Subject: [PATCH] version is now updated to a dev version when committing after a tagged version --- CMakeLists.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b24322d49..64c2c6ac7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -397,9 +397,18 @@ else() else() set(STORM_VERSION_DIRTY "false") endif() - message(STATUS "Storm - version is ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH} (${STORM_VERSION_COMMITS_AHEAD} commits ahead of tag), building from git: ${STORM_VERSION_GIT_HASH} (dirty: ${STORM_VERSION_DIRTY}).") + + set(STORM_VERSION_DEV_STRING "") + if(STORM_VERSION_COMMITS_AHEAD) + MATH(EXPR STORM_VERSION_DEV_PATCH "${STORM_VERSION_PATCH}+1") + + set(STORM_VERSION_DEV_STRING "(dev)") + else() + set(STORM_VERSION_DEV_PATCH ${STORM_VERSION_PATCH}) + endif() + message(STATUS "Storm - version is ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_DEV_PATCH}${STORM_VERSION_DEV_STRING} (version ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH} + ${STORM_VERSION_COMMITS_AHEAD} commits), building from git: ${STORM_VERSION_GIT_HASH} (dirty: ${STORM_VERSION_DIRTY}).") endif() -set(STORM_VERSION "${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH}") +set(STORM_VERSION "${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_DEV_PATCH}") # Configure a header file to pass some of the CMake settings to the source code