diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-05-04 12:49:57 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-05-04 11:57:05 +0000 |
commit | d08e5c33ff7b1d14be5e679eae5c9e2641fcc020 (patch) | |
tree | b8e89f69a7ff76ee9410bb60092f3b175c04b86b /qbs | |
parent | f553e3d16a4e2c2f4953bdf1dbcfa355c393790f (diff) |
Qbs build: Suppress excessive warnings from Qt with clang 10
We get these thousands of times:
/usr/include/qt/QtCore/qbytearray.h:586: warning: definition of implicit
copy constructor for 'QByteRef' is deprecated because it has a user-
declared copy assignment operator [-Wdeprecated-copy]
inline QByteRef &operator=(const QByteRef &c)
^
/usr/include/qt/QtCore/5.14.2/QtCore/private/qmetatype_p.h:111: warning:
use of logical '||' with constant operand [-Wconstant-logical-operand]
Change-Id: I5f97f23d9b62ef1cd8d07495c46598d2a34a6d85
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'qbs')
-rw-r--r-- | qbs/imports/QtcProduct.qbs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs index e54dc667f4..862c824743 100644 --- a/qbs/imports/QtcProduct.qbs +++ b/qbs/imports/QtcProduct.qbs @@ -36,6 +36,11 @@ Product { cpp.cxxFlags: { var flags = []; + if (qbs.toolchain.contains("clang") + && Utilities.versionCompare(cpp.compilerVersion, "10") >= 0) { + // Triggers a lot in Qt. + flags.push("-Wno-deprecated-copy", "-Wno-constant-logical-operand"); + } if (qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("clang")) { flags.push("-Wno-noexcept-type"); if (Utilities.versionCompare(cpp.compilerVersion, "9") >= 0) |