Commit 0a406dbe authored by dt's avatar dt

Add a makestep that cleans up

Make clean and rebuild all work.
parent 3d863b21
......@@ -506,6 +506,10 @@ void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader
if (!copw.buildDirectory().isEmpty())
setValue("all", "buildDirectory", copw.buildDirectory());
//TODO save arguments somewhere copw.arguments()
MakeStep *cleanMakeStep = new MakeStep(this);
insertCleanStep(0, cleanMakeStep);
cleanMakeStep->setValue("clean", true);
} else {
// We have a user file, but we could still be missing the cbp file
// TODO check that we have a cbp file and if not, open up a dialog ?
......
......@@ -99,10 +99,14 @@ bool MakeStep::init(const QString &buildConfiguration)
setCommand(buildConfiguration, "make"); // TODO give full path here?
#endif // Q_OS_WIN
QStringList arguments = value(buildConfiguration, "buildTargets").toStringList();
arguments << additionalArguments(buildConfiguration);
setArguments(buildConfiguration, arguments); // TODO
setEnvironment(buildConfiguration, m_pro->environment(buildConfiguration));
if (value("clean").isValid() && value("clean").toBool()) {
setArguments(buildConfiguration, QStringList() << "clean");
} else {
QStringList arguments = value(buildConfiguration, "buildTargets").toStringList();
arguments << additionalArguments(buildConfiguration);
setArguments(buildConfiguration, arguments); // TODO
setEnvironment(buildConfiguration, m_pro->environment(buildConfiguration));
}
return AbstractProcessStep::init(buildConfiguration);
}
......
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