summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2011-03-03 12:28:52 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2011-03-03 12:28:52 (GMT)
commite2a94d3a26adc267b35ddec93da41d8547922fda (patch)
treef7218a66e541baacac1d25a010f6f51ac0ff44bd /src
parent859a621dffe8e86f7ebceb168cb15d43db74524f (diff)
downloadSCons-e2a94d3a26adc267b35ddec93da41d8547922fda.zip
SCons-e2a94d3a26adc267b35ddec93da41d8547922fda.tar.gz
SCons-e2a94d3a26adc267b35ddec93da41d8547922fda.tar.bz2
Applied patch from #2732: support -std=c++0x in ParseFlags
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt3
-rw-r--r--src/RELEASE.txt2
-rw-r--r--src/engine/SCons/Environment.py7
-rw-r--r--src/engine/SCons/EnvironmentTests.py3
4 files changed, 14 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 9277765..a95ae82 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -7,6 +7,9 @@
RELEASE 2.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
+ From Justin Gullingsrud:
+ - support -std=c++0x and related CXXFLAGS in pkgconfig (ParseFlags)
+
From Vincent Beffara:
- Support -dylib_file in pkgconfig (ParseFlags)
diff --git a/src/RELEASE.txt b/src/RELEASE.txt
index af2873a..0832daf 100644
--- a/src/RELEASE.txt
+++ b/src/RELEASE.txt
@@ -80,6 +80,7 @@
IMPROVEMENTS
+ - ParseFlags now supports -std=c++0x and related CXXFLAGS
- ParseFlags now supports -dylib_file from pkgconfig
- New debugging options to print unlink/relinking of variant files
(--debug=duplicate) and preparation of targets (--debug=prepare).
@@ -123,6 +124,7 @@
Ken Deeter,
Luca Falavigna,
Alexander Goomenyuk,
+ Justin Gullingsrud,
Steven Knight,
Arve Knudsen,
Jean-Baptiste Lab,
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index d1f4941..b308765 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -649,6 +649,7 @@ class SubstitutionEnvironment(object):
'ASFLAGS' : SCons.Util.CLVar(''),
'CFLAGS' : SCons.Util.CLVar(''),
'CCFLAGS' : SCons.Util.CLVar(''),
+ 'CXXFLAGS' : SCons.Util.CLVar(''),
'CPPDEFINES' : [],
'CPPFLAGS' : SCons.Util.CLVar(''),
'CPPPATH' : [],
@@ -778,7 +779,11 @@ class SubstitutionEnvironment(object):
elif arg == '-mwindows':
dict['LINKFLAGS'].append(arg)
elif arg[:5] == '-std=':
- dict['CFLAGS'].append(arg) # C only
+ if arg[5:].find('++')!=-1:
+ key='CXXFLAGS'
+ else:
+ key='CFLAGS'
+ dict[key].append(arg)
elif arg[0] == '+':
dict['CCFLAGS'].append(arg)
dict['LINKFLAGS'].append(arg)
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 79ba795..9237c8a 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -763,6 +763,7 @@ sys.exit(0)
'ASFLAGS' : [],
'CFLAGS' : [],
'CCFLAGS' : [],
+ 'CXXFLAGS' : [],
'CPPDEFINES' : [],
'CPPFLAGS' : [],
'CPPPATH' : [],
@@ -793,6 +794,7 @@ sys.exit(0)
"-Wl,-Rrpath3 " + \
"-Wp,-cpp " + \
"-std=c99 " + \
+ "-std=c++0x " + \
"-framework Carbon " + \
"-frameworkdir=fwd1 " + \
"-Ffwd2 " + \
@@ -812,6 +814,7 @@ sys.exit(0)
'-pthread', '-fopenmp', '-mno-cygwin',
('-arch', 'i386'), ('-isysroot', '/tmp'),
'+DD64'], repr(d['CCFLAGS'])
+ assert d['CXXFLAGS'] == ['-std=c++0x'], repr(d['CXXFLAGS'])
assert d['CPPDEFINES'] == ['FOO', ['BAR', 'value'], 'BAZ'], d['CPPDEFINES']
assert d['CPPFLAGS'] == ['-Wp,-cpp'], d['CPPFLAGS']
assert d['CPPPATH'] == ['/usr/include/fum',