Convert build system to cmake

Also, produce fully static binaries. This means that `gethostname`
does not work (doesn't work with static glibc unless you build it
with `--enable-static-nss`, which no distro builds glibc with).
This commit is contained in:
Francesco Mazzoli
2023-01-26 16:58:04 +00:00
parent 0031bd719d
commit 9adca070ba
70 changed files with 478 additions and 294 deletions

19
cpp/core/Env.cpp Normal file
View File

@@ -0,0 +1,19 @@
#include "Env.hpp"
#include "Assert.hpp"
std::ostream& operator<<(std::ostream& out, LogLevel ll) {
switch (ll) {
case LogLevel::LOG_DEBUG:
out << "DEBUG";
break;
case LogLevel::LOG_INFO:
out << "INFO";
break;
case LogLevel::LOG_ERROR:
out << "ERROR";
break;
default:
throw EGGS_EXCEPTION("bad log level %s", (uint32_t)ll);
}
return out;
}