diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-25 11:32:01 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-25 11:32:01 +0200 |
commit | 71d9aedda0919fb22e39d6e6ce60506ceb69812e (patch) | |
tree | 585afc25774555047ff41dc865c617732caf5ff2 /build2/cc/guess.cxx | |
parent | a1f459f8446370704695919b3131653300866ee9 (diff) |
Add compiler_id enum
Diffstat (limited to 'build2/cc/guess.cxx')
-rw-r--r-- | build2/cc/guess.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/build2/cc/guess.cxx b/build2/cc/guess.cxx index 0569bdc..9f14661 100644 --- a/build2/cc/guess.cxx +++ b/build2/cc/guess.cxx @@ -14,6 +14,18 @@ namespace build2 { namespace cc { + auto compiler_id:: + value () const -> value_type + { + if (type == "gcc") return gcc; + if (type == "clang") return clang; + if (type == "msvc") return msvc; + if (type == "icc") return icc; + + assert (false); + return gcc; + } + // Pre-guess the compiler type based on the compiler executable name. // Return empty string if can't make a guess (for example, because the // compiler name is a generic 'c++'). Note that it only guesses the type, |