forked from qt-creator/qt-creator
CMake: Only offer kits with a cmake set up!
Change-Id: Icb4b539e009c9dc5bdf40f8d8b887bb65755b48b Reviewed-by: Cristian Adam <cristian.adam@gmail.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "cmakebuildconfiguration.h"
|
#include "cmakebuildconfiguration.h"
|
||||||
#include "cmakebuildstep.h"
|
#include "cmakebuildstep.h"
|
||||||
|
#include "cmakekitinformation.h"
|
||||||
#include "cmakeprojectconstants.h"
|
#include "cmakeprojectconstants.h"
|
||||||
#include "cmakeprojectnodes.h"
|
#include "cmakeprojectnodes.h"
|
||||||
#include "cmakerunconfiguration.h"
|
#include "cmakerunconfiguration.h"
|
||||||
@@ -389,6 +390,16 @@ bool CMakeProject::requiresTargetPanel() const
|
|||||||
return !targets().isEmpty();
|
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)
|
bool CMakeProject::isProjectFile(const FileName &fileName)
|
||||||
{
|
{
|
||||||
return m_watchedFiles.contains(fileName);
|
return m_watchedFiles.contains(fileName);
|
||||||
|
@@ -118,6 +118,8 @@ public:
|
|||||||
|
|
||||||
bool requiresTargetPanel() const override;
|
bool requiresTargetPanel() const override;
|
||||||
|
|
||||||
|
bool supportsKit(ProjectExplorer::Kit *k, QString *errorMessage = 0) const override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
/// emitted after parsing
|
/// emitted after parsing
|
||||||
void buildTargetsChanged();
|
void buildTargetsChanged();
|
||||||
|
Reference in New Issue
Block a user