More adventures in GCC warning flags. v2.15.35
authorCarl Hetherington <cth@carlh.net>
Sun, 17 Nov 2019 22:10:31 +0000 (23:10 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 17 Nov 2019 22:10:31 +0000 (23:10 +0100)
wscript

diff --git a/wscript b/wscript
index eff2b04387a239897bd363ff2f9ea74e5219880c..b133d9ec66b120687b97f8788efd708ee94ac7c1 100644 (file)
--- 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'])