Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm-version.h
Go to the documentation of this file.
1#pragma once
2
3#include <sstream>
4#include <string>
5
6namespace storm {
7
10 const static unsigned versionMajor;
11
13 const static unsigned versionMinor;
14
16 const static unsigned versionPatch;
17
19 const static std::string versionLabel;
20
22 const static bool versionDev;
23
24 enum class VersionSource { Git, Static };
25
28
30 const static std::string gitRevisionHash;
31
33 const static unsigned commitsAhead;
34
35 enum class DirtyState {
36 Clean,
37 Dirty,
38 Unknown
39 };
40
42 const static DirtyState dirty;
43
45 const static std::string systemName;
46
48 const static std::string systemVersion;
49
51 const static std::string cxxCompiler;
52
54 const static std::string cxxFlags;
55
56 static std::string shortVersionString() {
57 std::stringstream sstream;
58 sstream << versionMajor << "." << versionMinor << "." << versionPatch;
59 if (!versionLabel.empty()) {
60 sstream << "-" << versionLabel;
61 }
62 if (versionDev) {
63 sstream << " (dev)";
64 }
65 return sstream.str();
66 }
67
68 static std::string longVersionString() {
69 std::stringstream sstream;
70 sstream << "Version " << shortVersionString();
72 sstream << " (derived statically)";
73 }
74 if (commitsAhead > 0) {
75 sstream << " (+ " << commitsAhead << " commits)";
76 }
77 if (!gitRevisionHash.empty()) {
78 sstream << " build from revision " << gitRevisionHash;
79 } else {
80 sstream << " built from archive";
81 }
82 switch (dirty) {
84 sstream << " (clean)";
85 break;
87 sstream << " (dirty)";
88 break;
89 default:
90 sstream << " (potentially dirty)";
91 break;
92 }
93 return sstream.str();
94 }
95
96 static std::string buildInfo() {
97 std::stringstream sstream;
98 sstream << "Compiled on " << systemName << " " << systemVersion << " using " << cxxCompiler << " with flags '" << cxxFlags << "'";
99 return sstream.str();
100 }
101};
102} // namespace storm
LabParser.cpp.
Definition cli.cpp:18
static std::string longVersionString()
@ Unknown
some files were modified
@ Dirty
no files were modified in the checkout
static const std::string versionLabel
The label version of Storm (might be empty).
static const unsigned commitsAhead
How many commits passed since the tag was last set.
static const unsigned versionPatch
The patch version of Storm.
static const std::string gitRevisionHash
The short hash of the git commit this build is based on.
static const VersionSource versionSource
The source of the versioning information.
static const bool versionDev
Flag indicating if the version of Storm is a development version.
static const std::string systemName
The system which has compiled Storm.
static const std::string cxxCompiler
The compiler version that was used to build Storm.
static const DirtyState dirty
Indicates whether files were modified.
static const std::string systemVersion
The system version which has compiled Storm.
static std::string shortVersionString()
static std::string buildInfo()
static const std::string cxxFlags
The flags that were used to build Storm.
static const unsigned versionMajor
The major version of Storm.
static const unsigned versionMinor
The minor version of Storm.