forked from qt-creator/qt-creator
ProjectExplorer: Use function object for special build config init
Change-Id: I5da0f28ee1a64f8d9a3145f059019be702bee463 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -53,26 +53,25 @@ AutotoolsBuildConfiguration::AutotoolsBuildConfiguration(Target *parent, Core::I
|
||||
setBuildDirectory(Utils::FilePath::fromString("/<foobar>"));
|
||||
setBuildDirectoryHistoryCompleter("AutoTools.BuildDir.History");
|
||||
setConfigWidgetDisplayName(tr("Autotools Manager"));
|
||||
}
|
||||
|
||||
void AutotoolsBuildConfiguration::initialize()
|
||||
{
|
||||
// ### Build Steps Build ###
|
||||
// autogen.sh or autoreconf
|
||||
QFile autogenFile(target()->project()->projectDirectory().toString() + "/autogen.sh");
|
||||
if (autogenFile.exists())
|
||||
buildSteps()->appendStep(Constants::AUTOGEN_STEP_ID);
|
||||
else
|
||||
buildSteps()->appendStep(Constants::AUTORECONF_STEP_ID);
|
||||
setInitializer([this] {
|
||||
// ### Build Steps Build ###
|
||||
// autogen.sh or autoreconf
|
||||
QFile autogenFile(target()->project()->projectDirectory().toString() + "/autogen.sh");
|
||||
if (autogenFile.exists())
|
||||
buildSteps()->appendStep(Constants::AUTOGEN_STEP_ID);
|
||||
else
|
||||
buildSteps()->appendStep(Constants::AUTORECONF_STEP_ID);
|
||||
|
||||
// ./configure.
|
||||
buildSteps()->appendStep(Constants::CONFIGURE_STEP_ID);
|
||||
// ./configure.
|
||||
buildSteps()->appendStep(Constants::CONFIGURE_STEP_ID);
|
||||
|
||||
// make
|
||||
buildSteps()->appendStep(Constants::MAKE_STEP_ID);
|
||||
// make
|
||||
buildSteps()->appendStep(Constants::MAKE_STEP_ID);
|
||||
|
||||
// ### Build Steps Clean ###
|
||||
cleanSteps()->appendStep(Constants::MAKE_STEP_ID);
|
||||
// ### Build Steps Clean ###
|
||||
cleanSteps()->appendStep(Constants::MAKE_STEP_ID);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user