qbs build: Suppress some GCC 9 warnings

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 <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2019-07-02 13:42:30 +02:00
parent 5a9505d7b8
commit 7b2d41a972

View File

@@ -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"