31 #include "mxlib_uncomp_version.h"
36 const char * mxlib_comp_current_branch();
38 const char * mxlib_comp_current_sha1();
40 const bool mxlib_comp_repo_modified();
49 template<
typename iosT,
char comment='#'>
53 char c[] = {comment,
'\0'};
55 ios <<
c <<
"--------------------------------------------\n";
56 ios <<
c <<
" mxlib git status \n";
57 ios <<
c <<
" headers: \n";
58 ios <<
c <<
" branch: " << MXLIB_UNCOMP_BRANCH <<
"\n";
59 ios <<
c <<
" SHA1: " << MXLIB_UNCOMP_CURRENT_SHA1 <<
"\n";
60 ios <<
c <<
" modified flag: " << std::boolalpha << (bool) MXLIB_UNCOMP_REPO_MODIFIED <<
"\n";
61 ios <<
c <<
" compiled: \n";
62 ios <<
c <<
" branch: " << mxlib_comp_current_branch() <<
"\n";
63 ios <<
c <<
" SHA1: " << mxlib_comp_current_sha1() <<
"\n";
64 ios <<
c <<
" modified flag: " << std::boolalpha << (bool) mxlib_comp_repo_modified() <<
"\n";
65 ios <<
c <<
"--------------------------------------------\n";
77 template<
typename iosT,
char comment='#'>
79 const std::string & repoName,
80 const std::string & branch,
81 const std::string & sha1,
82 const bool & modified,
83 const std::string & section =
""
87 char c[] = {comment,
'\0'};
89 bool sect = !(section ==
"");
90 std::string space =
" ";
91 if(sect) space +=
" ";
93 ios <<
c <<
"--------------------------------------------\n";
94 ios <<
c <<
" " << repoName <<
" git status:\n";
95 if(sect) ios <<
c <<
" " << section <<
":\n";
96 ios <<
c << space <<
"branch: " << branch <<
"\n";
97 ios <<
c << space <<
"SHA1: " << sha1 <<
"\n";
98 ios <<
c << space <<
"modified flag: " << std::boolalpha << modified <<
"\n";
99 ios <<
c <<
"--------------------------------------------\n";
constexpr units::realT c()
The speed of light.
iosT & dumpGitStatus(iosT &ios)
Dump the current git status of the library to a stream.