From b25810b9668abe8f7cc7db24326a98c1b017966e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 21 Jun 2021 21:39:46 +0200 Subject: Distinguish between host and target builds. --- libcppbuild.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libcppbuild.h') 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& configuration(); bool hasConfiguration(const std::string& key); const std::string& getConfiguration(const std::string& key, -- cgit v1.2.3