Setup project structure for unified Makefile

This commit is contained in:
2024-09-19 16:32:58 +02:00
parent 9f232bcc52
commit 06c81c5d57
9 changed files with 175 additions and 0 deletions

19
src/version.cpp Normal file
View File

@ -0,0 +1,19 @@
#include "version.hpp"
#include "version.inc"
#include "commit.inc"
#include <sstream>
std::string {PROJECT}_version() {
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();
}