diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index 8167575a446..d9016ea1d60 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -32,6 +32,7 @@ #include "cmakebuildconfiguration.h" #include "cmakebuildstep.h" +#include "cmakekitinformation.h" #include "cmakeprojectconstants.h" #include "cmakeprojectnodes.h" #include "cmakerunconfiguration.h" @@ -389,6 +390,16 @@ bool CMakeProject::requiresTargetPanel() const return !targets().isEmpty(); } +bool CMakeProject::supportsKit(Kit *k, QString *errorMessage) const +{ + if (!CMakeKitInformation::cmakeTool(k)) { + if (errorMessage) + *errorMessage = tr("No cmake tool set."); + return false; + } + return true; +} + bool CMakeProject::isProjectFile(const FileName &fileName) { return m_watchedFiles.contains(fileName); diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.h b/src/plugins/cmakeprojectmanager/cmakeproject.h index 9dbe69aa8ae..1adfcd61cbe 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.h +++ b/src/plugins/cmakeprojectmanager/cmakeproject.h @@ -118,6 +118,8 @@ public: bool requiresTargetPanel() const override; + bool supportsKit(ProjectExplorer::Kit *k, QString *errorMessage = 0) const override; + signals: /// emitted after parsing void buildTargetsChanged();