Merge branch 'warnings' into v2.15.x.
[dcpomatic.git] / wscript
diff --git a/wscript b/wscript
index b9e7d6a640278e4ff0b120e9dd1e9b3d5f42d8b8..f874758dde6d87d36267809965f643eef0d4b313 100644 (file)
--- a/wscript
+++ b/wscript
@@ -122,6 +122,11 @@ def configure(conf):
         if int(gcc[0]) >= 8:
             # I tried and failed to ignore these with _Pragma
             conf.env.append_value('CXXFLAGS', ['-Wno-cast-function-type'])
+        elif int(gcc[0]) == 7:
+            # There appears to be a GCC bug which lingered from major versions 5--7 and which
+            # flags up these warnings all over the place in boost::optional.
+            # These seems to be the only practical way to hide it
+            conf.env.append_value('CXXFLAGS', ['-Wno-maybe-uninitialized'])
         have_c11 = int(gcc[0]) >= 4 and int(gcc[1]) >= 8 and int(gcc[2]) >= 1
     else:
         have_c11 = False
@@ -549,6 +554,7 @@ def configure(conf):
                                 #include <boost/process.hpp>\n
                                 int main() { new boost::process::child("foo"); }\n
                                 """,
+                           cxxflags='-Wno-unused-parameter',
                            msg='Checking for boost process library',
                            lib=deps,
                            uselib_store='BOOST_PROCESS')