forked from qt-creator/qt-creator
Add a makestep that cleans up
Make clean and rebuild all work.
This commit is contained in:
@@ -506,6 +506,10 @@ void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader
|
|||||||
if (!copw.buildDirectory().isEmpty())
|
if (!copw.buildDirectory().isEmpty())
|
||||||
setValue("all", "buildDirectory", copw.buildDirectory());
|
setValue("all", "buildDirectory", copw.buildDirectory());
|
||||||
//TODO save arguments somewhere copw.arguments()
|
//TODO save arguments somewhere copw.arguments()
|
||||||
|
|
||||||
|
MakeStep *cleanMakeStep = new MakeStep(this);
|
||||||
|
insertCleanStep(0, cleanMakeStep);
|
||||||
|
cleanMakeStep->setValue("clean", true);
|
||||||
} else {
|
} else {
|
||||||
// We have a user file, but we could still be missing the cbp file
|
// 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 ?
|
// 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?
|
setCommand(buildConfiguration, "make"); // TODO give full path here?
|
||||||
#endif // Q_OS_WIN
|
#endif // Q_OS_WIN
|
||||||
|
|
||||||
|
if (value("clean").isValid() && value("clean").toBool()) {
|
||||||
|
setArguments(buildConfiguration, QStringList() << "clean");
|
||||||
|
} else {
|
||||||
QStringList arguments = value(buildConfiguration, "buildTargets").toStringList();
|
QStringList arguments = value(buildConfiguration, "buildTargets").toStringList();
|
||||||
arguments << additionalArguments(buildConfiguration);
|
arguments << additionalArguments(buildConfiguration);
|
||||||
setArguments(buildConfiguration, arguments); // TODO
|
setArguments(buildConfiguration, arguments); // TODO
|
||||||
setEnvironment(buildConfiguration, m_pro->environment(buildConfiguration));
|
setEnvironment(buildConfiguration, m_pro->environment(buildConfiguration));
|
||||||
|
}
|
||||||
return AbstractProcessStep::init(buildConfiguration);
|
return AbstractProcessStep::init(buildConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user