diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2022-07-04 12:14:20 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2022-07-04 13:25:46 +0000 |
commit | 764213fc53fe387dfc66f1b606516c6f9f9df567 (patch) | |
tree | 4e92d658c0728ee1dbe67e14035b878d54c7c052 | |
parent | 85711c54b13cb119ccfc0473bfe0a064e3ca6403 (diff) | |
download | qbs-764213fc53fe387dfc66f1b606516c6f9f9df567.tar.gz |
qbs build: Fix use of warning flag
-Wconstant-logical-operand is clang-only.
Change-Id: I8dbba65b503b865ac331ce555b941f9dc1929e3a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs b/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs index 4a50298fd..28104b55b 100644 --- a/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs +++ b/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs @@ -58,9 +58,11 @@ Module { function versionAtLeast(v) { return Utilities.versionCompare(cpp.compilerVersion, v) >= 0; }; + if (isClang()) + flags.push("-Wno-constant-logical-operand"); if ((!isClang() && versionAtLeast("9")) || (isClang() && !qbs.hostOS.contains("darwin") && versionAtLeast("10"))) { - flags.push("-Wno-deprecated-copy", "-Wno-constant-logical-operand"); + flags.push("-Wno-deprecated-copy"); } return flags; } |