1
1
2
+ #include " executioninformation.hpp"
3
+ #include < boost/date_time/posix_time/posix_time.hpp>
4
+ #include < boost/filesystem.hpp>
2
5
#include < cstdio>
3
6
#include < ctime>
4
7
#include < random>
5
- #include < boost/filesystem.hpp>
6
- #include < boost/date_time/posix_time/posix_time.hpp>
7
8
#include " entropy.hpp"
8
- #include " executioninformation.hpp"
9
9
10
10
using namespace std ;
11
11
@@ -17,22 +17,25 @@ string reconstitute_cmdline(int argc, const char **argv) {
17
17
}
18
18
19
19
ExecutionInformation::ExecutionInformation ()
20
- : ExecutionInformation(" program_name" , " unknown" , " unknown" , " " ) {}
20
+ : ExecutionInformation(" program_name" , " unknown" , " unknown" , " unknown " , " " ) {}
21
21
22
22
ExecutionInformation::ExecutionInformation (const string &name,
23
23
const string &version,
24
- const string &branch, int argc,
24
+ const string &branch,
25
+ const string &build, int argc,
25
26
const char **argv)
26
- : ExecutionInformation(name, version, branch,
27
+ : ExecutionInformation(name, version, branch, build,
27
28
reconstitute_cmdline (argc, argv)) {}
28
29
29
30
ExecutionInformation::ExecutionInformation (const string &name,
30
31
const string &version,
31
32
const string &branch,
33
+ const string &build,
32
34
const string &cmd)
33
35
: program_name(boost::filesystem::path(name).filename().string()),
34
36
program_version(version),
35
37
git_branch(branch),
38
+ build_type(build),
36
39
cmdline(cmd),
37
40
datetime(),
38
41
directory(boost::filesystem::initial_path().string()) {
@@ -43,7 +46,7 @@ ExecutionInformation::ExecutionInformation(const string &name,
43
46
}
44
47
45
48
string ExecutionInformation::name_and_version () const {
46
- return program_name + " " + program_version + " [" + git_branch + " branch]" ;
49
+ return program_name + " " + program_version + " [" + git_branch + " branch] - " + build_type + " build " ;
47
50
}
48
51
49
52
string generate_random_label (const string &prefix, size_t n_rnd_char) {
0 commit comments