From 1b5b4c8c57b34b1a451418472442197b8ae1da37 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Thu, 21 Jul 2016 11:15:10 +0200 Subject: Ignore warnings in Qt headers and fix Boost.Signals2 detection SCons will now include Qt headers via -isystem if the compiler is either clang or gcc to ignore warnings in files out of our control. Fix SCons to test for boost/signals2.hpp header instead of boost/signals.hpp as we migrated to the newer signals2 library. Test-Information: Successfully build with allow_warnings=0 on Debian 8.5 with system boost. Change-Id: Ie6871daae73d97369de4de652e994ad5542715cf diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 6dd1115..b5757b8 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -211,7 +211,7 @@ if env.get("boost_includedir", None) : boost_flags["CPPFLAGS"] = [("-isystem", env["boost_includedir"])] boost_conf_env.MergeFlags(boost_flags) conf = Configure(boost_conf_env) -boostLibs = [("signals", None), ("system", "system/system_error.hpp"), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("serialization", "archive/text_oarchive.hpp"), ("date_time", "date_time/date.hpp")] +boostLibs = [(None, "signals2.hpp"), ("system", "system/system_error.hpp"), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("serialization", "archive/text_oarchive.hpp"), ("date_time", "date_time/date.hpp")] allLibsPresent = True libNames = [] for (lib, header) in boostLibs : @@ -222,7 +222,7 @@ for (lib, header) in boostLibs : if not conf.CheckCXXHeader(header) : allLibsPresent = False break - if env["PLATFORM"] != "win32" : + if lib and env["PLATFORM"] != "win32" : libName = "boost_" + lib if not conf.CheckLib(libName, language='CXX') : libName += "-mt" diff --git a/BuildTools/SCons/Tools/qt4.py b/BuildTools/SCons/Tools/qt4.py index 31477c6..0e248d9 100644 --- a/BuildTools/SCons/Tools/qt4.py +++ b/BuildTools/SCons/Tools/qt4.py @@ -516,8 +516,11 @@ def enable_modules(self, modules, debug=False, crosscompiling=False, version='4' test_conf.Finish() raise Exception('Qt installation is missing packages. The following are required: %s' % modules_str) return - test_conf.env.ParseConfig("pkg-config --cflags --libs " + modules_str) - self.AppendUnique(LIBS=test_conf.env["LIBS"], LIBPATH=test_conf.env["LIBPATH"], CPPPATH=test_conf.env["CPPPATH"]) + + def parse_conf_as_system(env, cmd, unique=1): + return env.MergeFlags(cmd.replace("-I/", include_flag + "/"), unique) + + test_conf.env.ParseConfig("pkg-config --cflags --libs " + modules_str, parse_conf_as_system) self["QT4_MOCCPPPATH"] = self["CPPPATH"] test_conf.Finish() return -- cgit v0.10.2-6-g49f6