forked from qt-creator/qt-creator
CMake: Fix default cmake tool
If Boot2Qt devices are registered, their CMake tool would often end up as the default. Instead now we only auto select a cmake tool on the local machine. Change-Id: I677ab06ae88ff36209e691ea0fadb356436e973c Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -426,8 +426,9 @@ void CMakeToolManager::ensureDefaultCMakeToolIsValid()
|
|||||||
} else {
|
} else {
|
||||||
if (findById(d->m_defaultCMake))
|
if (findById(d->m_defaultCMake))
|
||||||
return;
|
return;
|
||||||
auto cmakeTool = Utils::findOrDefault(
|
auto cmakeTool = Utils::findOrDefault(cmakeTools(), [](CMakeTool *tool) {
|
||||||
cmakeTools(), [](CMakeTool *tool){ return tool->detectionSource().isEmpty(); });
|
return tool->detectionSource().isEmpty() && !tool->cmakeExecutable().needsDevice();
|
||||||
|
});
|
||||||
if (cmakeTool)
|
if (cmakeTool)
|
||||||
d->m_defaultCMake = cmakeTool->id();
|
d->m_defaultCMake = cmakeTool->id();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user