Commit 440053f7 authored by dt's avatar dt
Browse files

Fixes: Add the cmakestep and makestep to a buildconfigratuion.

Task:     -
RevBy:    -
AutoTest: -
Details:  Actually building only works on unix (since the generator is
hardcoded.) and make is called without any parameters which is wrong.
A lot is missing for basic build support, but this is a start.
parent f633d66c
......@@ -34,6 +34,8 @@
#include "cmakeproject.h"
#include "cmakeprojectconstants.h"
#include "cmakeprojectnodes.h"
#include "cmakestep.h"
#include "makestep.h"
#include <extensionsystem/pluginmanager.h>
#include <cpptools/cppmodelmanagerinterface.h>
......@@ -187,7 +189,7 @@ QString CMakeProject::buildDirectory(const QString &buildConfiguration) const
return "";
return QFileInfo(m_fileName).absolutePath();
ProjectExplorer::BuildStepConfigWidget *CMakeProject::createConfigWidget()
......@@ -230,7 +232,23 @@ void CMakeProject::saveSettingsImpl(ProjectExplorer::PersistentSettingsWriter &w
void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader &reader)
if (buildConfigurations().isEmpty()) {
// No build configuration, adding those
// TODO do we want to create one build configuration per target?
// or how do we want to handle that?
CMakeStep *cmakeStep = new CMakeStep(this);
MakeStep *makeStep = new MakeStep(this);
insertBuildStep(0, cmakeStep);
insertBuildStep(1, makeStep);
// Restoring is fine
......@@ -54,7 +54,7 @@ bool CMakeStep::init(const QString &buildConfiguration)
setEnabled(buildConfiguration, true);
setWorkingDirectory(buildConfiguration, m_pro->buildDirectory(buildConfiguration));
setCommand(buildConfiguration, "cmake"); // TODO give full path here?
setArguments(buildConfiguration, QStringList()); // TODO
setArguments(buildConfiguration, QStringList() << "-GUnix Makefiles"); // TODO
setEnvironment(buildConfiguration, m_pro->environment(buildConfiguration));
return AbstractProcessStep::init(buildConfiguration);
Supports Markdown
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