summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-17 23:10:31 +0100
committerCarl Hetherington <cth@carlh.net>2019-11-17 23:10:31 +0100
commitbcb962515b31ac6a40a3393c6d4e07b28cedc62b (patch)
tree87c8104427783e12754bd722f4c4a99da075d357
parentea0073fae742eb6fe56216ca19cf2242c4deca3f (diff)
More adventures in GCC warning flags.v2.15.35
-rw-r--r--wscript15
1 files changed, 9 insertions, 6 deletions
diff --git a/wscript b/wscript
index eff2b0438..b133d9ec6 100644
--- a/wscript
+++ b/wscript
@@ -113,12 +113,15 @@ def configure(conf):
if conf.options.force_cpp11:
conf.env.append_value('CXXFLAGS', ['-std=c++11', '-DBOOST_NO_CXX11_SCOPED_ENUMS'])
- gcc = conf.env['CC_VERSION']
- if int(gcc[0]) >= 4 and int(gcc[1]) > 1:
- conf.env.append_value('CXXFLAGS', ['-Wno-unused-result'])
- if int(gcc[0]) >= 9:
- conf.env.append_value('CXXFLAGS', ['-Wno-deprecated-copy'])
- have_c11 = int(gcc[0]) >= 4 and int(gcc[1]) >= 8 and int(gcc[2]) >= 1
+ if conf.env['CXX_NAME'] == 'gcc':
+ gcc = conf.env['CC_VERSION']
+ if int(gcc[0]) >= 4 and int(gcc[1]) > 1:
+ conf.env.append_value('CXXFLAGS', ['-Wno-unused-result'])
+ if int(gcc[0]) >= 9:
+ conf.env.append_value('CXXFLAGS', ['-Wno-deprecated-copy'])
+ have_c11 = int(gcc[0]) >= 4 and int(gcc[1]) >= 8 and int(gcc[2]) >= 1
+ else:
+ have_c11 = False
if conf.options.enable_debug:
conf.env.append_value('CXXFLAGS', ['-g', '-DDCPOMATIC_DEBUG', '-fno-omit-frame-pointer'])