Qbs: Suppress spurious warnings about mismatching compiler paths

Apparently, MSVC toolchains set their compiler paths asynchronously, so
don't complain if it's empty initially.

Fixes: QTCREATORBUG-23725
Change-Id: Id800fa01d6368d244ec879181d12f6f7c7f1bf0a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
Christian Kandeler
2020-03-19 17:13:51 +01:00
parent 621a823a53
commit 29488fbdaf

View File

@@ -353,7 +353,8 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
data.insert(QLatin1String(CPP_CXXCOMPILERNAME), cxxCompilerName);
}
if (tcC && tcCxx && cFileInfo.absolutePath() != cxxFileInfo.absolutePath()) {
if (tcC && tcCxx && !cCompilerPath.isEmpty() && !cxxCompilerPath.isEmpty()
&& cFileInfo.absolutePath() != cxxFileInfo.absolutePath()) {
Core::MessageManager::write(tr("C and C++ compiler paths differ. C compiler may not work."),
Core::MessageManager::ModeSwitch);
}