Browse Source

Refactored version setting in CMake

tempestpy_adaptions
Matthias Volk 7 years ago
parent
commit
3f241280ea
  1. 24
      CMakeLists.txt

24
CMakeLists.txt

@ -398,20 +398,22 @@ else()
else()
set(STORM_VERSION_DIRTY "false")
endif()
endif()
set(STORM_VERSION_DEV_STRING "")
set(STORM_VERSION_DEV "false")
if(STORM_VERSION_COMMITS_AHEAD)
MATH(EXPR STORM_VERSION_DEV_PATCH "${STORM_VERSION_PATCH}+1")
set(STORM_VERSION_DEV_STRING " (dev)")
set(STORM_VERSION_DEV "true")
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}).")
set(STORM_VERSION_DEV "false")
set(STORM_VERSION_DEV_STRING "")
if(STORM_VERSION_COMMITS_AHEAD)
MATH(EXPR STORM_VERSION_DEV_PATCH "${STORM_VERSION_PATCH}+1")
set(STORM_VERSION_DEV "true")
set(STORM_VERSION_DEV_STRING " (dev)")
else()
set(STORM_VERSION_DEV_PATCH ${STORM_VERSION_PATCH})
endif()
set(STORM_VERSION "${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_DEV_PATCH}")
set(STORM_VERSION_STRING "${STORM_VERSION}${STORM_VERSION_DEV_STRING}")
message(STATUS "Storm - version is ${STORM_VERSION_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}).")
# Configure a header file to pass some of the CMake settings to the source code

Loading…
Cancel
Save