aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-17 11:12:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-17 11:12:02 +0200
commit17850b7e936d9a8c38800360ab932367b8774813 (patch)
tree460220bdd67e3150c846dad5cae3622c5fb8a8c2 /build
parentd45dbc807adc05bc03437116659c6abd4f5174c8 (diff)
Use c++0x and c++1y for compatibility with older compilers
Diffstat (limited to 'build')
-rw-r--r--build/cxx/rule.cxx13
1 files changed, 11 insertions, 2 deletions
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<const string&> ());
- // @@ 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 ());
}
}