aboutsummaryrefslogtreecommitdiffstats
path: root/QtVsTools.Core
diff options
context:
space:
mode:
authorMiguel Costa <miguel.costa@qt.io>2021-12-17 11:04:02 +0100
committerMiguel Costa <miguel.costa@qt.io>2021-12-17 16:14:53 +0000
commit5f37d0ee9701914b090ac86b379640475154ecfe (patch)
tree606d2c85694ea2d523010923b17e36412e40e0e1 /QtVsTools.Core
parent2802dc9ea8131da90e101749dbe6df3cfe2a84b7 (diff)
Print debug message with path to cl
Before starting qmake, the vcvars batch file must be called to obtain the path to the msvc compiler. Added some output messages to debug situations where qmake errors out with a 'cl not found' message. Task-number: QTVSADDINBUG-915 Change-Id: I392c2ff9a90c4fa4b6e081ee9c728a19e1808129 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Diffstat (limited to 'QtVsTools.Core')
-rw-r--r--QtVsTools.Core/HelperFunctions.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/QtVsTools.Core/HelperFunctions.cs b/QtVsTools.Core/HelperFunctions.cs
index c7aff0e8..d02810ca 100644
--- a/QtVsTools.Core/HelperFunctions.cs
+++ b/QtVsTools.Core/HelperFunctions.cs
@@ -1745,6 +1745,8 @@ namespace QtVsTools.Core
else if (!isOS64Bit && isQt64Bit)
vcVarsCmd = Path.Combine(vcPath, @"Auxiliary\Build\vcvarsx86_amd64.bat");
+ Messages.Print($"vcvars: {vcVarsCmd}");
+
const string markSTX = ":@:@:@";
const string markEOL = ":#:#:#";
string command =
@@ -1818,6 +1820,12 @@ namespace QtVsTools.Core
}
}
}
+ string envPath = startInfo.EnvironmentVariables["PATH"];
+ string clPath = envPath.Split(';')
+ .Select(path => Path.Combine(path, "cl.exe"))
+ .Where(pathToCl => File.Exists(pathToCl))
+ .FirstOrDefault();
+ Messages.Print($"cl: {clPath ?? "NOT FOUND"}");
return true;
}