From 7b2d41a9724323df38672a7109b7d48def80a950 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 2 Jul 2019 13:42:30 +0200 Subject: qbs build: Suppress some GCC 9 warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise, we get thousands of warnings from Qt, e.g.: qvariant.h:275:25: warning: implicitly-declared ‘constexpr QVariant::Private& QVariant::Private::operator=(const QVariant::Private&)’ is deprecated [-Wdeprecated-copy] Change-Id: I8b3bbfae6791adca8bcfacc7ad5ab46701474aa4 Reviewed-by: Christian Stenger --- qbs/imports/QtcProduct.qbs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'qbs/imports') diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs index a031474c29b..e54dc667f4a 100644 --- a/qbs/imports/QtcProduct.qbs +++ b/qbs/imports/QtcProduct.qbs @@ -34,14 +34,18 @@ Product { // because conflicting scalar values would be reported (QBS-1225 would fix that). cpp.minimumMacosVersion: project.minimumMacosVersion - Properties { - condition: qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("clang") - cpp.cxxFlags: base.concat(["-Wno-noexcept-type"]) - } - Properties { - condition: qbs.toolchain.contains("msvc") - cpp.cxxFlags: base.concat(["/w44996"]) + cpp.cxxFlags: { + var flags = []; + if (qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("clang")) { + flags.push("-Wno-noexcept-type"); + if (Utilities.versionCompare(cpp.compilerVersion, "9") >= 0) + flags.push("-Wno-deprecated-copy", "-Wno-init-list-lifetime"); + } else if (qbs.toolchain.contains("msvc")) { + flags.push("/w44996"); + } + return flags; } + cpp.cxxLanguageVersion: "c++14" cpp.defines: qtc.generalDefines cpp.minimumWindowsVersion: "6.1" -- cgit v1.2.3