forked from qt-creator/qt-creator
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:
@@ -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"])
|
||||
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");
|
||||
}
|
||||
Properties {
|
||||
condition: qbs.toolchain.contains("msvc")
|
||||
cpp.cxxFlags: base.concat(["/w44996"])
|
||||
return flags;
|
||||
}
|
||||
|
||||
cpp.cxxLanguageVersion: "c++14"
|
||||
cpp.defines: qtc.generalDefines
|
||||
cpp.minimumWindowsVersion: "6.1"
|
||||
|
Reference in New Issue
Block a user