aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/guess.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cc/guess.cxx')
-rw-r--r--build2/cc/guess.cxx12
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,