Commit 870cfdf0 authored by Tobias Hunger's avatar Tobias Hunger

CMake: Use "cmake --build" to build

This removes the need to know about ninja and make in the cmakebuildstep.

Change-Id: Id3a15c34f4a8003c3cbf9d62f246bd08f0ada264
Reviewed-by: default avatarTim Jenssen <tim.jenssen@theqtcompany.com>
parent 81ffd984
...@@ -59,11 +59,10 @@ public: ...@@ -59,11 +59,10 @@ public:
explicit CMakeBuildStep(ProjectExplorer::BuildStepList *bsl); explicit CMakeBuildStep(ProjectExplorer::BuildStepList *bsl);
CMakeBuildConfiguration *cmakeBuildConfiguration() const; CMakeBuildConfiguration *cmakeBuildConfiguration() const;
CMakeBuildConfiguration *targetsActiveBuildConfiguration() const;
bool init(QList<const BuildStep *> &earlierSteps) override; bool init(QList<const BuildStep *> &earlierSteps) override;
void run(QFutureInterface<bool> &fi) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override; bool immutable() const override;
...@@ -73,27 +72,25 @@ public: ...@@ -73,27 +72,25 @@ public:
void setBuildTargets(const QStringList &targets); void setBuildTargets(const QStringList &targets);
void clearBuildTargets(); void clearBuildTargets();
QString additionalArguments() const; QString toolArguments() const;
void setAdditionalArguments(const QString &list); void setToolArguments(const QString &list);
QString allArguments(const CMakeRunConfiguration *rc) const;
bool addRunConfigurationArgument() const; bool addRunConfigurationArgument() const;
void setAddRunConfigurationArgument(bool add); void setAddRunConfigurationArgument(bool add);
QString makeCommand(ProjectExplorer::ToolChain *tc, const Utils::Environment &env) const; QString cmakeCommand() const;
QVariantMap toMap() const override; QVariantMap toMap() const override;
void setUserMakeCommand(const QString &make);
QString userMakeCommand() const;
static QString cleanTarget(); static QString cleanTarget();
private: private:
void activeBuildConfigurationChanged();
void buildTargetsChanged(); void buildTargetsChanged();
signals: signals:
void makeCommandChanged(); void cmakeCommandChanged();
void targetsToBuildChanged(); void targetsToBuildChanged();
protected: protected:
...@@ -110,18 +107,15 @@ protected: ...@@ -110,18 +107,15 @@ protected:
private: private:
void ctor(); void ctor();
CMakeBuildConfiguration *targetsActiveBuildConfiguration() const;
CMakeRunConfiguration *targetsActiveRunConfiguration() const; CMakeRunConfiguration *targetsActiveRunConfiguration() const;
QRegExp m_percentProgress; QRegExp m_percentProgress;
QRegExp m_ninjaProgress; QRegExp m_ninjaProgress;
QString m_ninjaProgressString; QString m_ninjaProgressString;
QStringList m_buildTargets; QStringList m_buildTargets;
QString m_additionalArguments; QString m_toolArguments;
bool m_addRunConfigurationArgument; bool m_addRunConfigurationArgument;
bool m_useNinja; bool m_useNinja;
CMakeBuildConfiguration *m_activeConfiguration;
QString m_makeCmd;
}; };
class CMakeBuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget class CMakeBuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
...@@ -134,17 +128,15 @@ public: ...@@ -134,17 +128,15 @@ public:
private: private:
void itemChanged(QListWidgetItem*); void itemChanged(QListWidgetItem*);
void makeEdited(); void toolArgumentsEdited();
void additionalArgumentsEdited();
void updateDetails(); void updateDetails();
void buildTargetsChanged(); void buildTargetsChanged();
void selectedBuildTargetsChanged(); void selectedBuildTargetsChanged();
private: private:
CMakeBuildStep *m_buildStep; CMakeBuildStep *m_buildStep;
Utils::PathChooser *m_makePathChooser;
QListWidget *m_buildTargetsList; QListWidget *m_buildTargetsList;
QLineEdit *m_additionalArguments; QLineEdit *m_toolArguments;
QString m_summaryText; QString m_summaryText;
}; };
...@@ -154,7 +146,6 @@ class CMakeBuildStepFactory : public ProjectExplorer::IBuildStepFactory ...@@ -154,7 +146,6 @@ class CMakeBuildStepFactory : public ProjectExplorer::IBuildStepFactory
public: public:
explicit CMakeBuildStepFactory(QObject *parent = 0); explicit CMakeBuildStepFactory(QObject *parent = 0);
virtual ~CMakeBuildStepFactory();
bool canCreate(ProjectExplorer::BuildStepList *parent, Core::Id id) const; bool canCreate(ProjectExplorer::BuildStepList *parent, Core::Id id) const;
ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, Core::Id id); ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, Core::Id id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment