diff --git a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp index 4f373b8ee34..d8f380e3b6f 100644 --- a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp +++ b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp @@ -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); }