Hack to fix build on gcc 4.1.
authorCarl Hetherington <cth@carlh.net>
Mon, 23 May 2016 15:16:55 +0000 (16:16 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 23 May 2016 15:16:55 +0000 (16:16 +0100)
wscript

diff --git a/wscript b/wscript
index 78454565f38535d58d29a7259c9b7cc22422c29e..93a9fc49396d1085f4dbd9e8cb72c3e49d58b9c5 100644 (file)
--- a/wscript
+++ b/wscript
@@ -83,6 +83,10 @@ def configure(conf):
                                        '-Wno-deprecated-declarations',
                                        '-D_FILE_OFFSET_BITS=64'])
 
+    gcc = conf.env['CC_VERSION']
+    if int(gcc[0]) >= 4 and int(gcc[1]) > 1:
+        conf.env.append_value('CXXFLAGS', ['-Wno-unused-result'])
+
     if conf.options.enable_debug:
         conf.env.append_value('CXXFLAGS', ['-g', '-DDCPOMATIC_DEBUG', '-fno-omit-frame-pointer'])
     else: