diff --git a/CMakeLists.txt b/CMakeLists.txt index d5b905eb1..0b3570417 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -400,10 +400,12 @@ else() 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_STRING " (dev)") + set(STORM_VERSION_DEV "true") else() set(STORM_VERSION_DEV_PATCH ${STORM_VERSION_PATCH}) endif() diff --git a/src/storm/utility/storm-version.h b/src/storm/utility/storm-version.h index cfe705304..e4d372cc7 100644 --- a/src/storm/utility/storm-version.h +++ b/src/storm/utility/storm-version.h @@ -18,6 +18,9 @@ namespace storm { /// The patch version of Storm. const static unsigned versionPatch; + /// Flag indicating if the version of Storm is a development version. + const static bool versionDev; + /// The short hash of the git commit this build is based on const static std::string gitRevisionHash; @@ -42,12 +45,18 @@ namespace storm { static std::string shortVersionString() { std::stringstream sstream; sstream << versionMajor << "." << versionMinor << "." << versionPatch; + if (versionDev) { + sstream << " (dev)"; + } return sstream.str(); } static std::string longVersionString() { std::stringstream sstream; sstream << "Version " << versionMajor << "." << versionMinor << "." << versionPatch; + if (versionDev) { + sstream << " (dev)"; + } if (commitsAhead) { sstream << " (+ " << commitsAhead << " commits)"; } @@ -71,7 +80,7 @@ namespace storm { static std::string buildInfo() { std::stringstream sstream; sstream << "Compiled on " << systemName << " " << systemVersion << " using " << cxxCompiler << " with flags '" << cxxFlags << "'"; - return sstream.str(); + return sstream.str(); } }; } diff --git a/storm-version.cpp.in b/storm-version.cpp.in index 61d9b4bc5..c6c1acf71 100644 --- a/storm-version.cpp.in +++ b/storm-version.cpp.in @@ -7,7 +7,8 @@ namespace storm { const unsigned StormVersion::versionMajor = @STORM_VERSION_MAJOR@; const unsigned StormVersion::versionMinor = @STORM_VERSION_MINOR@; - const unsigned StormVersion::versionPatch = @STORM_VERSION_PATCH@; + const unsigned StormVersion::versionPatch = @STORM_VERSION_DEV_PATCH@; + const bool StormVersion::versionDev = @STORM_VERSION_DEV@; const std::string StormVersion::gitRevisionHash = "@STORM_VERSION_GIT_HASH@"; const unsigned StormVersion::commitsAhead = @STORM_VERSION_COMMITS_AHEAD@; const boost::optional StormVersion::dirty = @STORM_VERSION_DIRTY@;