Restructure project

This commit is contained in:
Duncan Ogilvie
2021-03-05 17:32:31 +01:00
parent f929cf5f80
commit 173c5e0f58
12 changed files with 110 additions and 72 deletions
-24
View File
@@ -1,24 +0,0 @@
#include "error.h"
#include <assert.h>
namespace cmkr {
namespace error {
Status::Status(Code ec) noexcept : ec_(ec) {}
Status::operator int() const noexcept { return static_cast<int>(ec_); }
Status::Code Status::code() const noexcept { return ec_; }
} // namespace error
} // namespace cmkr
const char *err_string[] = {
"Success", "Runtime error", "Initialization error", "CMake generation error", "Build error",
};
const char *cmkr_error_status(int i) {
assert(i >= 0 && i < 5);
return err_string[i];
}