build: Force to compile using C++11

Starting this commit, NS-3/ndnSIM requires gcc >= 4.7 or clang >= 3.5
This commit is contained in:
Spyridon Mastorakis authored and Alexander Afanasyev committed 2015-01-03 20:52:55 -08:00
1 parent 861e001084
commit dcd06923bd
2 files changed
+7 -6

No files matched your search

+1
View File
@@ -48,4 +48,5 @@ massif.*
src/ndnSIM
configure
toggle
.ns3rc
+6 -6
View File
@@ -19,7 +19,7 @@ class GccTraits(CompilerTraits):
def __init__(self):
super(GccTraits, self).__init__()
# cumulative list of warnings per level
self.warnings_flags = [['-Wall']]
self.warnings_flags = [['-Wall', '-std=c++11']]
def get_warnings_flags(self, level):
warnings = []
@@ -47,7 +47,7 @@ class GccTraits(CompilerTraits):
return (['-g'], [])
elif level >= 2:
return (['-ggdb', '-g3'], ['_DEBUG'])
class IccTraits(CompilerTraits):
def __init__(self):
@@ -55,7 +55,7 @@ class IccTraits(CompilerTraits):
# cumulative list of warnings per level
# icc is _very_ verbose with -Wall, -Werror is barely achievable
self.warnings_flags = [[], [], ['-Wall']]
def get_warnings_flags(self, level):
warnings = []
for l in range(level):
@@ -82,7 +82,7 @@ class IccTraits(CompilerTraits):
return (['-g'], [])
elif level >= 2:
return (['-ggdb', '-g3'], ['_DEBUG'])
class MsvcTraits(CompilerTraits):
@@ -161,7 +161,7 @@ def configure(conf):
if not (cc or cxx):
raise Utils.WafError("neither COMPILER_CC nor COMPILER_CXX are defined; "
"maybe the compiler_cc or compiler_cxx tool has not been configured yet?")
try:
compiler = compiler_mapping[cc]
except KeyError:
@@ -177,7 +177,7 @@ def configure(conf):
optimizations = compiler.get_optimization_flags(opt_level)
debug, debug_defs = compiler.get_debug_flags(dbg_level)
warnings = compiler.get_warnings_flags(warn_level)
if cc and not conf.env['CCFLAGS']:
conf.env.append_value('CCFLAGS', optimizations)
conf.env.append_value('CCFLAGS', debug)