From fd264310c26d34f206b26b49c0801f1965efbea1 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 28 Dec 2017 22:23:59 -0800 Subject: [PATCH] [waf] Add -std=c++11 when CXXFLAGS is specified without -std= setting --- wscript | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wscript b/wscript index e4570816..b5b0d125 100644 --- a/wscript +++ b/wscript @@ -137,6 +137,8 @@ def configure(ctx): # If environment variable CXXFLAGS is unset, provide a sane default. if not ctx.env.CXXFLAGS: ctx.env.CXXFLAGS = cxxflags + elif all(not x.startswith('-std=') for x in ctx.env.CXXFLAGS): + ctx.env.CXXFLAGS.append('-std=c++11') if not ctx.env.LDFLAGS: ctx.env.LDFLAGS = ldflags else: