From f1c3482e0d06f5e18480d25f2ac36f4b410f0b51 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 10 Oct 2023 09:45:10 +0200 Subject: [PATCH] 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 --- src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp index 3cb04046204..19d7d5f2c12 100644 --- a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp @@ -426,8 +426,9 @@ void CMakeToolManager::ensureDefaultCMakeToolIsValid() } else { if (findById(d->m_defaultCMake)) return; - auto cmakeTool = Utils::findOrDefault( - cmakeTools(), [](CMakeTool *tool){ return tool->detectionSource().isEmpty(); }); + auto cmakeTool = Utils::findOrDefault(cmakeTools(), [](CMakeTool *tool) { + return tool->detectionSource().isEmpty() && !tool->cmakeExecutable().needsDevice(); + }); if (cmakeTool) d->m_defaultCMake = cmakeTool->id(); }