From 17850b7e936d9a8c38800360ab932367b8774813 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 17 Jun 2015 11:12:02 +0200 Subject: Use c++0x and c++1y for compatibility with older compilers --- build/cxx/rule.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build/cxx/rule.cxx b/build/cxx/rule.cxx index f63c92a..c9d451d 100644 --- a/build/cxx/rule.cxx +++ b/build/cxx/rule.cxx @@ -59,9 +59,18 @@ namespace build { const string& v (val.as ()); - // @@ Need to translate 11 to 0x for older versions. + // Translate 11 to 0x and 14 to 1y for compatibility with + // older versions of the compiler. // - opt = "-std=c++" + v; + opt = "-std=c++"; + + if (v == "11") + opt += "0x"; + else if (v == "14") + opt += "1y"; + else + opt += v; + args.push_back (opt.c_str ()); } } -- cgit v1.1