forked from qt-creator/qt-creator
CMake: Only allow one target in cmake build step
CMake will silently ignore all but the last target (or fail to build anything). This allows to simplify our code. Change-Id: Ieee3931aca0788307107e2021d507073ef42a21f Task-number: QTCREATORBUG-15928 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -409,14 +409,14 @@ ProjectExplorer::BuildConfiguration *CMakeBuildConfigurationFactory::create(Proj
|
||||
|
||||
auto cleanStep = new CMakeBuildStep(cleanSteps);
|
||||
cleanSteps->insertStep(0, cleanStep);
|
||||
cleanStep->setBuildTarget(CMakeBuildStep::cleanTarget(), true);
|
||||
cleanStep->setBuildTarget(CMakeBuildStep::cleanTarget());
|
||||
|
||||
bc->setBuildDirectory(copy.buildDirectory);
|
||||
bc->setCMakeConfiguration(copy.configuration);
|
||||
|
||||
// Default to all
|
||||
if (project->hasBuildTarget(QLatin1String("all")))
|
||||
buildStep->setBuildTarget(QLatin1String("all"), true);
|
||||
if (project->hasBuildTarget(CMakeBuildStep::allTarget()))
|
||||
buildStep->setBuildTarget(CMakeBuildStep::allTarget());
|
||||
|
||||
return bc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user