From 7edc16d7c1268752d7bd4f7e7135db98cfc5f544 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 24 Feb 2014 03:25:15 +0000 Subject: [PATCH] [SCons] Use more generic flag for warning suppression Older versions of Clang don't support '-Wno-unused-result'. --- ext/SConscript | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/ext/SConscript b/ext/SConscript index dea36f0b9..c0ea84d88 100644 --- a/ext/SConscript +++ b/ext/SConscript @@ -8,12 +8,8 @@ def prep_default(env): localenv = env.Clone() # Suppress warnings from external code and auto-generated code - if 'g++' in localenv['CXX']: - localenv.Append(CCFLAGS=['-Wno-format', '-Wno-format-security', - '-Wno-unused-result']) - - if localenv['CC'] == 'clang': - localenv['CCFLAGS'].append('-w') + if 'g++' in localenv['CXX'] or 'clang' in localenv['CXX']: + localenv.Append(CCFLAGS='-w') return localenv @@ -139,11 +135,7 @@ for subdir, extensions, prepFunction in libs: # Google Test: Used internally for Cantera unit tests. Optionally, the headers # and compiled library can be installed alongside Cantera using the scons # option 'install_gtest=y'. -localenv = env.Clone() -localenv.Prepend(CPPPATH=[Dir('#ext/gtest'), - Dir('#ext/gtest/include')], - CPPDEFINES={'GTEST_HAS_PTHREAD': 0}) - +localenv = prep_gtest(env) gtest = build(localenv.Library(pjoin('../lib', 'gtest'), source=['gtest/src/gtest-all.cc']))