mkproj/tpl/version.cpp

20 lines
452 B
C++
Raw Normal View History

2024-12-23 16:18:39 +01:00
#include "version.hpp"
#include <sstream>
std::string {PROJECT}_version() {
#include "version.inc"
#include "commit.inc"
2024-12-23 16:18:39 +01:00
std::ostringstream oss;
oss << "{PROJECT} version " << version;
#ifdef DEBUG
oss << " DEBUG";
#endif
oss << '\n';
if (commit[0] != '\0') {
oss << "build " << commit << ", ";
}
oss << __DATE__ << ", " << __TIME__ << '\n';
oss << "(c) Bob Polis, all rights reserved";
return oss.str();
}