forked from qt-creator/qt-creator
CMake: Disable BC if there is an error during initial cmake run
* Disable the BC and give report the cmake error * Show a warning label in the BC Change-Id: If5737d033fa2682c264ab7ac1189c59947e3b28d Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -451,6 +451,14 @@ CMakeConfig BuildDirManager::parseConfiguration() const
|
||||
CMakeConfigItem::Type t = fromByteArray(type);
|
||||
if (t != CMakeConfigItem::INTERNAL)
|
||||
result << CMakeConfigItem(key, t, documentation, value);
|
||||
|
||||
// Sanity checks:
|
||||
if (key == "CMAKE_HOME_DIRECTORY") {
|
||||
const Utils::FileName actualSourceDir = Utils::FileName::fromUserInput(QString::fromUtf8(value));
|
||||
if (actualSourceDir != m_sourceDir)
|
||||
emit errorOccured(tr("Build directory contains a build of the wrong project (%1).")
|
||||
.arg(actualSourceDir.toUserOutput()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user