summaryrefslogtreecommitdiff
path: root/libcppbuild.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-21 21:39:46 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-21 21:39:46 +0200
commitb25810b9668abe8f7cc7db24326a98c1b017966e (patch)
tree40cda88ffbf8dccfc2d2335783f608966874c58e /libcppbuild.h
parentc53e622b648635539e4870fd0c9159c5d8c3be4a (diff)
Distinguish between host and target builds.
Diffstat (limited to 'libcppbuild.h')
-rw-r--r--libcppbuild.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libcppbuild.h b/libcppbuild.h
index 81e7a9e..9ea3fb1 100644
--- a/libcppbuild.h
+++ b/libcppbuild.h
@@ -54,6 +54,22 @@ int reg(const char* location, BuildConfigurations (*cb)());
#define UNIQUE_NAME(base) CONCAT(base, __LINE__)
#define REG(cb) namespace { int UNIQUE_NAME(unique) = reg(__FILE__, cb); }
+// Predefined configuration keys
+namespace cfg
+{
+constexpr auto builddir = "builddir";
+
+constexpr auto target_cc = "target-cc";
+constexpr auto target_cpp = "target-cpp";
+constexpr auto target_ar = "target-ar";
+constexpr auto target_ld = "target-ld";
+
+constexpr auto host_cc = "host-cc";
+constexpr auto host_cpp = "host-cpp";
+constexpr auto host_ar = "host-ar";
+constexpr auto host_ld = "host-ld";
+}
+
const std::map<std::string, std::string>& configuration();
bool hasConfiguration(const std::string& key);
const std::string& getConfiguration(const std::string& key,