From f5a13789ee53426f64ccb254a464949cf6276f01 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Mon, 31 May 2021 20:49:11 +0300 Subject: 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 --- share/qbs/modules/cpp/msvc.js | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- cgit v1.2.3