From e2ba7fa123213fcc5673119b8d993d7967a1fb24 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 7 Sep 2017 18:09:44 +0200 Subject: Implement {c,cxx}.guess modules These can be loaded before {c,cxx} to guess the compiler. Based on this information we can then choose the standard, experimental features, etc. For example: using cxx.guess if ($cxx.id == 'clang') cxx.features.modules = false cxx.std = experimental using cxx --- build2/b.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build2/b.cxx') diff --git a/build2/b.cxx b/build2/b.cxx index 95bf876..0520bd8 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -333,9 +333,11 @@ main (int argc, char* argv[]) bm["cc.config"] = mf {nullptr, &cc::config_init}; bm["cc"] = mf {nullptr, &cc::init}; + bm["c.guess"] = mf {nullptr, &c::guess_init}; bm["c.config"] = mf {nullptr, &c::config_init}; bm["c"] = mf {nullptr, &c::init}; + bm["cxx.guess"] = mf {nullptr, &cxx::guess_init}; bm["cxx.config"] = mf {nullptr, &cxx::config_init}; bm["cxx"] = mf {nullptr, &cxx::init}; -- cgit v1.1