summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Komissarov <ABBAPOH@gmail.com>2021-05-31 20:49:11 +0300
committerIvan Komissarov <ABBAPOH@gmail.com>2021-06-01 09:50:05 +0000
commitf5a13789ee53426f64ccb254a464949cf6276f01 (patch)
tree6fed571e4680a40448684b973eeb6ccf1eab28fb
parentae63b558af0f541d83f69195e730d3007f28e9c4 (diff)
downloadqbs-f5a13789ee53426f64ccb254a464949cf6276f01.tar.gz
msvc: fix system include support with MSVC >= 19.29.30037
Otherwise, compiler fails with "ERROR: cl : Command line warning D9007 : '/external:I' requires '/external:W'; option ignored" Change-Id: I45b01175e5d868370368d31dafa19d0d455f267c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--share/qbs/modules/cpp/msvc.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js
index 9f3d20282..b22ebdbd0 100644
--- a/share/qbs/modules/cpp/msvc.js
+++ b/share/qbs/modules/cpp/msvc.js
@@ -217,6 +217,10 @@ function prepareCompiler(project, product, inputs, outputs, input, output, expli
var includeFlag = "/I";
if (supportsExternalIncludesOption(input)) {
args.push("/experimental:external");
+ var enforcesSlashW =
+ Utilities.versionCompare(input.cpp.compilerVersion, "19.29.30037") >= 0
+ if (enforcesSlashW)
+ args.push("/external:W0")
includeFlag = "/external:I"
}
allSystemIncludePaths.forEach(function(path) {