From e5e740344d3be520f83278d81c61628b64564155 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 10 Mar 2022 13:16:37 +0100 Subject: [PATCH] CMake: Be more graceful for device related bits Also when reading settings. Check was there for writing already, and possibly should not exist at all, other kit settings are not purging at that stage. Change-Id: Ia052efd5a791f4a86be3d26a61ebeb94d506b012 Reviewed-by: Cristian Adam --- .../cmakeprojectmanager/cmaketoolsettingsaccessor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp b/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp index acd9422fc74..0629273d968 100644 --- a/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp @@ -239,9 +239,10 @@ CMakeToolSettingsAccessor::cmakeTools(const QVariantMap &data, bool fromSdk) con const QVariantMap dbMap = data.value(key).toMap(); auto item = std::make_unique(dbMap, fromSdk); - if (item->isAutoDetected() && !item->cmakeExecutable().isExecutableFile()) { - qWarning() << QString::fromLatin1("CMakeTool \"%1\" (%2) dropped since the command is not executable.") - .arg(item->cmakeExecutable().toUserOutput(), item->id().toString()); + const FilePath cmakeExecutable = item->cmakeExecutable(); + if (item->isAutoDetected() && !cmakeExecutable.needsDevice() && !cmakeExecutable.isExecutableFile()) { + qWarning() << QString("CMakeTool \"%1\" (%2) dropped since the command is not executable.") + .arg(cmakeExecutable.toUserOutput(), item->id().toString()); continue; }