From 1bf439f7918f2c6f8fa07db3abb53722156945c7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 31 Aug 2018 19:28:20 +0200 Subject: Add ability to print cc compiler_id value --- build2/cc/guess.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'build2/cc/guess.cxx') diff --git a/build2/cc/guess.cxx b/build2/cc/guess.cxx index e9b102f..0a60ffd 100644 --- a/build2/cc/guess.cxx +++ b/build2/cc/guess.cxx @@ -15,6 +15,19 @@ namespace build2 { namespace cc { + compiler_id:: + compiler_id (value_type v) + { + switch (v) + { + case clang_apple: type = "clang"; variant = "apple"; break; + case clang: type = "clang"; break; + case gcc: type = "gcc"; break; + case msvc: type = "msvc"; break; + case icc: type = "icc"; break; + } + } + auto compiler_id:: value () const -> value_type { -- cgit v1.1