Browse Source

Use version label in cli

tempestpy_adaptions
Matthias Volk 7 years ago
parent
commit
c4ebf751f4
  1. 11
      src/storm/utility/storm-version.h
  2. 1
      storm-version.cpp.in

11
src/storm/utility/storm-version.h

@ -18,6 +18,9 @@ namespace storm {
/// The patch version of Storm.
const static unsigned versionPatch;
/// The label version of Storm (might be empty).
const static std::string versionLabel;
/// Flag indicating if the version of Storm is a development version.
const static bool versionDev;
@ -45,6 +48,9 @@ namespace storm {
static std::string shortVersionString() {
std::stringstream sstream;
sstream << versionMajor << "." << versionMinor << "." << versionPatch;
if (!versionLabel.empty()) {
sstream << "-" << versionLabel;
}
if (versionDev) {
sstream << " (dev)";
}
@ -53,10 +59,7 @@ namespace storm {
static std::string longVersionString() {
std::stringstream sstream;
sstream << "Version " << versionMajor << "." << versionMinor << "." << versionPatch;
if (versionDev) {
sstream << " (dev)";
}
sstream << "Version " << shortVersionString();
if (commitsAhead) {
sstream << " (+ " << commitsAhead << " commits)";
}

1
storm-version.cpp.in

@ -8,6 +8,7 @@ namespace storm {
const unsigned StormVersion::versionMajor = @STORM_VERSION_MAJOR@;
const unsigned StormVersion::versionMinor = @STORM_VERSION_MINOR@;
const unsigned StormVersion::versionPatch = @STORM_VERSION_DEV_PATCH@;
const std::string StormVersion::versionLabel = "@STORM_VERSION_LABEL@";
const bool StormVersion::versionDev = @STORM_VERSION_DEV@;
const std::string StormVersion::gitRevisionHash = "@STORM_VERSION_GIT_HASH@";
const unsigned StormVersion::commitsAhead = @STORM_VERSION_COMMITS_AHEAD@;

Loading…
Cancel
Save