summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2014-10-01 20:29:04 (GMT)
committerDirk Baechle <dl9obn@darc.de>2014-10-01 20:29:04 (GMT)
commitce5bf1790e1d0e7f254bbaca57ce3dcaa5795efd (patch)
tree6a32cfc742b8573333153fc9a2eb920c7901c83e
parent03a83a3d4cb16181642bd85b72d70f26d79ee290 (diff)
parentf8614aa2d65f2b2484efdaf55a4b8c506157e915 (diff)
downloadSCons-ce5bf1790e1d0e7f254bbaca57ce3dcaa5795efd.zip
SCons-ce5bf1790e1d0e7f254bbaca57ce3dcaa5795efd.tar.gz
SCons-ce5bf1790e1d0e7f254bbaca57ce3dcaa5795efd.tar.bz2
Merged in jamessan/scons (pull request #184), support for -isystem in ParseFlags
-rw-r--r--src/CHANGES.txt6
-rw-r--r--src/engine/SCons/Environment.py5
-rw-r--r--src/engine/SCons/EnvironmentTests.py10
3 files changed, 14 insertions, 7 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 1798e36..8c02e14 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -6,10 +6,8 @@
RELEASE VERSION/DATE TO BE FILLED IN LATER
- From John Doe:
-
- - Whatever John Doe did.
-
+ From James McCoy:
+ - Added support for '-isystem' to ParseFlags.
RELEASE 2.3.4 - Mon, 27 Sep 2014 12:50:35 -0400
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index 62d6809..5f2c9ff 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -719,6 +719,9 @@ class SubstitutionEnvironment(object):
t = ('-isysroot', arg)
dict['CCFLAGS'].append(t)
dict['LINKFLAGS'].append(t)
+ elif append_next_arg_to == '-isystem':
+ t = ('-isystem', arg)
+ dict['CCFLAGS'].append(t)
elif append_next_arg_to == '-arch':
t = ('-arch', arg)
dict['CCFLAGS'].append(t)
@@ -791,7 +794,7 @@ class SubstitutionEnvironment(object):
elif arg[0] == '+':
dict['CCFLAGS'].append(arg)
dict['LINKFLAGS'].append(arg)
- elif arg in ['-include', '-isysroot', '-arch']:
+ elif arg in ['-include', '-isysroot', '-isystem', '-arch']:
append_next_arg_to = arg
else:
dict['CCFLAGS'].append(arg)
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index b9ef3f2..a0869e8 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -805,7 +805,9 @@ sys.exit(0)
"-pthread " + \
"-fopenmp " + \
"-mno-cygwin -mwindows " + \
- "-arch i386 -isysroot /tmp +DD64 " + \
+ "-arch i386 -isysroot /tmp " + \
+ "-isystem /usr/include/foo " + \
+ "+DD64 " + \
"-DFOO -DBAR=value -D BAZ "
d = env.ParseFlags(s)
@@ -815,6 +817,7 @@ sys.exit(0)
assert d['CCFLAGS'] == ['-X', '-Wa,-as',
'-pthread', '-fopenmp', '-mno-cygwin',
('-arch', 'i386'), ('-isysroot', '/tmp'),
+ ('-isystem', '/usr/include/foo'),
'+DD64'], repr(d['CCFLAGS'])
assert d['CXXFLAGS'] == ['-std=c++0x'], repr(d['CXXFLAGS'])
assert d['CPPDEFINES'] == ['FOO', ['BAR', 'value'], 'BAZ'], d['CPPDEFINES']
@@ -2051,7 +2054,9 @@ def generate(env):
"-F fwd3 " + \
"-pthread " + \
"-mno-cygwin -mwindows " + \
- "-arch i386 -isysroot /tmp +DD64 " + \
+ "-arch i386 -isysroot /tmp " + \
+ "-isystem /usr/include/foo " + \
+ "+DD64 " + \
"-DFOO -DBAR=value")
env.ParseConfig("fake $COMMAND")
assert save_command == ['fake command'], save_command
@@ -2059,6 +2064,7 @@ def generate(env):
assert env['CCFLAGS'] == ['', '-X', '-Wa,-as',
'-pthread', '-mno-cygwin',
('-arch', 'i386'), ('-isysroot', '/tmp'),
+ ('-isystem', '/usr/include/foo'),
'+DD64'], env['CCFLAGS']
assert env['CPPDEFINES'] == ['FOO', ['BAR', 'value']], env['CPPDEFINES']
assert env['CPPFLAGS'] == ['', '-Wp,-cpp'], env['CPPFLAGS']