forked from qt-creator/qt-creator
PE: Fix handling of compiler command on Windows
Broke with c60c642fe5 and resulted in losing the
compiler command for Qbs and CMake for MSVC based tool
chains.
Change-Id: I400fda14869ebf11dc7ddc2fda7d5a52a2fc096a
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1149,8 +1149,8 @@ void MsvcToolChain::rescanForCompiler()
|
||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||
addToEnvironment(env);
|
||||
|
||||
m_compilerCommand
|
||||
= env.searchInPath(QLatin1String("cl.exe"), {}, [](const Utils::FilePath &name) {
|
||||
setCompilerCommand(
|
||||
env.searchInPath(QLatin1String("cl.exe"), {}, [](const Utils::FilePath &name) {
|
||||
QDir dir(QDir::cleanPath(name.toFileInfo().absolutePath() + QStringLiteral("/..")));
|
||||
do {
|
||||
if (QFile::exists(dir.absoluteFilePath(QStringLiteral("vcvarsall.bat")))
|
||||
@@ -1158,7 +1158,7 @@ void MsvcToolChain::rescanForCompiler()
|
||||
return true;
|
||||
} while (dir.cdUp() && !dir.isRoot());
|
||||
return false;
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
QList<OutputLineParser *> MsvcToolChain::createOutputParsers() const
|
||||
|
||||
@@ -152,8 +152,6 @@ private:
|
||||
mutable Utils::Environment m_lastEnvironment; // Last checked 'incoming' environment.
|
||||
mutable Utils::Environment m_resultEnvironment; // Resulting environment for VC
|
||||
|
||||
Utils::FilePath m_compilerCommand;
|
||||
|
||||
protected:
|
||||
QString m_vcvarsBat;
|
||||
QString m_varsBatArg; // Argument
|
||||
|
||||
Reference in New Issue
Block a user