aboutsummaryrefslogtreecommitdiffstats
path: root/qbs
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2019-07-02 13:42:30 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2019-07-02 13:47:56 +0000
commit7b2d41a9724323df38672a7109b7d48def80a950 (patch)
tree0d432ac45713f6869ff1e3c956408ed7e01d47fb /qbs
parent5a9505d7b8f19b2e6e20ef6844e7d5f7bce4bda5 (diff)
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>
Diffstat (limited to 'qbs')
-rw-r--r--qbs/imports/QtcProduct.qbs18
1 files changed, 11 insertions, 7 deletions
diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs
index a031474c29..e54dc667f4 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"