|
@ -7,35 +7,38 @@ |
|
|
|
|
|
|
|
|
namespace storm { |
|
|
namespace storm { |
|
|
namespace utility { |
|
|
namespace utility { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct StormVersion { |
|
|
struct StormVersion { |
|
|
/// The major version of Storm. |
|
|
/// The major version of Storm. |
|
|
const static unsigned versionMajor; |
|
|
const static unsigned versionMajor; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// The minor version of Storm. |
|
|
/// The minor version of Storm. |
|
|
const static unsigned versionMinor; |
|
|
const static unsigned versionMinor; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// The patch version of Storm. |
|
|
/// The patch version of Storm. |
|
|
const static unsigned versionPatch; |
|
|
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. |
|
|
/// Flag indicating if the version of Storm is a development version. |
|
|
const static bool versionDev; |
|
|
const static bool versionDev; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// The short hash of the git commit this build is based on |
|
|
/// The short hash of the git commit this build is based on |
|
|
const static std::string gitRevisionHash; |
|
|
const static std::string gitRevisionHash; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// How many commits passed since the tag was last set. |
|
|
/// How many commits passed since the tag was last set. |
|
|
const static unsigned commitsAhead; |
|
|
const static unsigned commitsAhead; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// 0 iff there no files were modified in the checkout, 1 otherwise. If none, no information about dirtyness is given. |
|
|
/// 0 iff there no files were modified in the checkout, 1 otherwise. If none, no information about dirtyness is given. |
|
|
const static boost::optional<bool> dirty; |
|
|
const static boost::optional<bool> dirty; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// The system which has compiled Storm. |
|
|
/// The system which has compiled Storm. |
|
|
const static std::string systemName; |
|
|
const static std::string systemName; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// The system version which has compiled Storm. |
|
|
/// The system version which has compiled Storm. |
|
|
const static std::string systemVersion; |
|
|
const static std::string systemVersion; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// The compiler version that was used to build Storm. |
|
|
/// The compiler version that was used to build Storm. |
|
|
const static std::string cxxCompiler; |
|
|
const static std::string cxxCompiler; |
|
|
|
|
|
|
|
@ -45,18 +48,18 @@ namespace storm { |
|
|
static std::string shortVersionString() { |
|
|
static std::string shortVersionString() { |
|
|
std::stringstream sstream; |
|
|
std::stringstream sstream; |
|
|
sstream << versionMajor << "." << versionMinor << "." << versionPatch; |
|
|
sstream << versionMajor << "." << versionMinor << "." << versionPatch; |
|
|
|
|
|
if (!versionLabel.empty()) { |
|
|
|
|
|
sstream << "-" << versionLabel; |
|
|
|
|
|
} |
|
|
if (versionDev) { |
|
|
if (versionDev) { |
|
|
sstream << " (dev)"; |
|
|
sstream << " (dev)"; |
|
|
} |
|
|
} |
|
|
return sstream.str(); |
|
|
return sstream.str(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static std::string longVersionString() { |
|
|
static std::string longVersionString() { |
|
|
std::stringstream sstream; |
|
|
std::stringstream sstream; |
|
|
sstream << "Version " << versionMajor << "." << versionMinor << "." << versionPatch; |
|
|
|
|
|
if (versionDev) { |
|
|
|
|
|
sstream << " (dev)"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
sstream << "Version " << shortVersionString(); |
|
|
if (commitsAhead) { |
|
|
if (commitsAhead) { |
|
|
sstream << " (+ " << commitsAhead << " commits)"; |
|
|
sstream << " (+ " << commitsAhead << " commits)"; |
|
|
} |
|
|
} |
|
@ -76,7 +79,7 @@ namespace storm { |
|
|
} |
|
|
} |
|
|
return sstream.str(); |
|
|
return sstream.str(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static std::string buildInfo() { |
|
|
static std::string buildInfo() { |
|
|
std::stringstream sstream; |
|
|
std::stringstream sstream; |
|
|
sstream << "Compiled on " << systemName << " " << systemVersion << " using " << cxxCompiler << " with flags '" << cxxFlags << "'"; |
|
|
sstream << "Compiled on " << systemName << " " << systemVersion << " using " << cxxCompiler << " with flags '" << cxxFlags << "'"; |
|
|