diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2011-01-12 03:40:50 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2011-01-12 03:40:50 (GMT) |
commit | 3d9b98eacc2a308536361af2c1a8e4809bc5186a (patch) | |
tree | 33688d195fd6144ad9b5baffb7d32e372671155e /src | |
parent | c75872cedf394e9c3804441bda2f4dcbf7722ce8 (diff) | |
download | SCons-3d9b98eacc2a308536361af2c1a8e4809bc5186a.zip SCons-3d9b98eacc2a308536361af2c1a8e4809bc5186a.tar.gz SCons-3d9b98eacc2a308536361af2c1a8e4809bc5186a.tar.bz2 |
Added -fopenmp and -openmp to ParseFlags (add to LINKFLAGS and CCFLAGS)
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/SCons/Environment.py | 8 | ||||
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index ed3aaa0..805d0c4 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -766,14 +766,14 @@ class SubstitutionEnvironment(object): dict['FRAMEWORKPATH'].append(arg[2:]) else: append_next_arg_to = 'FRAMEWORKPATH' - elif arg == '-mno-cygwin': + elif arg in ['-mno-cygwin', + '-pthread', + '-openmp', + '-fopenmp']: dict['CCFLAGS'].append(arg) dict['LINKFLAGS'].append(arg) elif arg == '-mwindows': dict['LINKFLAGS'].append(arg) - elif arg == '-pthread': - dict['CCFLAGS'].append(arg) - dict['LINKFLAGS'].append(arg) elif arg[:5] == '-std=': dict['CFLAGS'].append(arg) # C only elif arg[0] == '+': diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 7feb76d..81461d4 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -798,6 +798,7 @@ sys.exit(0) "-Ffwd2 " + \ "-F fwd3 " + \ "-pthread " + \ + "-fopenmp " + \ "-mno-cygwin -mwindows " + \ "-arch i386 -isysroot /tmp +DD64 " + \ "-DFOO -DBAR=value -D BAZ " @@ -807,7 +808,7 @@ sys.exit(0) assert d['ASFLAGS'] == ['-as'], d['ASFLAGS'] assert d['CFLAGS'] == ['-std=c99'] assert d['CCFLAGS'] == ['-X', '-Wa,-as', - '-pthread', '-mno-cygwin', + '-pthread', '-fopenmp', '-mno-cygwin', ('-arch', 'i386'), ('-isysroot', '/tmp'), '+DD64'], d['CCFLAGS'] assert d['CPPDEFINES'] == ['FOO', ['BAR', 'value'], 'BAZ'], d['CPPDEFINES'] @@ -822,7 +823,7 @@ sys.exit(0) 'C:\\Program Files\\ASCEND'], d['LIBPATH'] LIBS = list(map(str, d['LIBS'])) assert LIBS == ['xxx', 'yyy', 'ascend'], (d['LIBS'], LIBS) - assert d['LINKFLAGS'] == ['-Wl,-link', '-pthread', + assert d['LINKFLAGS'] == ['-Wl,-link', '-pthread', '-fopenmp', '-mno-cygwin', '-mwindows', ('-arch', 'i386'), ('-isysroot', '/tmp'), |