QbsProjectManager: Un-break MSVC.

Commit aad5ca12c4 was over-eager, wrongly assuming the presence of
cpp.cxxCompilerName for MSVC and also not taking into account that
we don't set cpp.compilerVersion* from Qt Creator.

Task-number: QBS-846
Change-Id: Id6a88c18f2c460ef66f0339aeb999b7fc0321225
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This commit is contained in:
Christian Kandeler
2015-08-05 16:51:38 +02:00
parent a269acbb9e
commit 707d49d2fb
2 changed files with 14 additions and 1 deletions

View File

@@ -230,13 +230,23 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
const QString toolchainPrefix = extractToolchainPrefix(&compilerName);
if (!toolchainPrefix.isEmpty())
data.insert(QLatin1String(CPP_TOOLCHAINPREFIX), toolchainPrefix);
data.insert(QLatin1String(CPP_CXXCOMPILERNAME), compilerName);
if (toolchain.contains(QLatin1String("msvc")))
data.insert(QLatin1String(CPP_COMPILERNAME), compilerName);
else
data.insert(QLatin1String(CPP_CXXCOMPILERNAME), compilerName);
if (targetAbi.os() != ProjectExplorer::Abi::WindowsOS
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
data.insert(QLatin1String(CPP_LINKERNAME), compilerName);
}
data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxxFileInfo.absolutePath());
// TODO: Remove this once compiler version properties are set for MSVC
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {
const QLatin1String flags("/FS");
data.insert(QLatin1String(CPP_PLATFORMCFLAGS), flags);
data.insert(QLatin1String(CPP_PLATFORMCXXFLAGS), flags);
}
return data;
}