forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -36,6 +36,11 @@ Product {
|
|||||||
|
|
||||||
cpp.cxxFlags: {
|
cpp.cxxFlags: {
|
||||||
var flags = [];
|
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")) {
|
if (qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("clang")) {
|
||||||
flags.push("-Wno-noexcept-type");
|
flags.push("-Wno-noexcept-type");
|
||||||
if (Utilities.versionCompare(cpp.compilerVersion, "9") >= 0)
|
if (Utilities.versionCompare(cpp.compilerVersion, "9") >= 0)
|
||||||
|
Reference in New Issue
Block a user