forked from qt-creator/qt-creator
CMakePM: Add support for build CMake presets
This patchset will add support for version 2 of the CMakePresets feature that has been implemented in CMake 3.20 https://cmake.org/cmake/help/v3.20/manual/cmake-presets.7.html Task-number: QTCREATORBUG-24555 Change-Id: I08934243cc04487d38c4b59c2ad4a4a8d0484492 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -54,8 +54,26 @@ public:
|
||||
|
||||
QString activeRunConfigTarget() const;
|
||||
|
||||
void setBuildPreset(const QString &preset);
|
||||
|
||||
Utils::Environment environment() const;
|
||||
void setUserEnvironmentChanges(const Utils::EnvironmentItems &diff);
|
||||
Utils::EnvironmentItems userEnvironmentChanges() const;
|
||||
bool useClearEnvironment() const;
|
||||
void setUseClearEnvironment(bool b);
|
||||
void updateAndEmitEnvironmentChanged();
|
||||
|
||||
Utils::Environment baseEnvironment() const;
|
||||
QString baseEnvironmentText() const;
|
||||
|
||||
void setCMakeArguments(const QStringList &cmakeArguments);
|
||||
void setToolArguments(const QStringList &nativeToolArguments);
|
||||
|
||||
void setConfiguration(const QString &configuration);
|
||||
|
||||
signals:
|
||||
void buildTargetsChanged();
|
||||
void environmentChanged();
|
||||
|
||||
private:
|
||||
Utils::CommandLine cmakeCommand() const;
|
||||
@@ -69,6 +87,7 @@ private:
|
||||
QWidget *createConfigWidget() override;
|
||||
|
||||
QString defaultBuildTarget() const;
|
||||
bool isCleanStep() const;
|
||||
|
||||
void runImpl();
|
||||
void handleProjectWasParsed(bool success);
|
||||
@@ -90,6 +109,12 @@ private:
|
||||
QString m_installTarget = "install";
|
||||
|
||||
Utils::TreeModel<Utils::TreeItem, CMakeTargetItem> m_buildTargetModel;
|
||||
|
||||
Utils::Environment m_environment;
|
||||
Utils::EnvironmentItems m_userEnvironmentChanges;
|
||||
bool m_clearSystemEnvironment = false;
|
||||
QString m_buildPreset;
|
||||
std::optional<QString> m_configuration;
|
||||
};
|
||||
|
||||
class CMakeBuildStepFactory : public ProjectExplorer::BuildStepFactory
|
||||
|
||||
Reference in New Issue
Block a user