forked from qt-creator/qt-creator
CMakePM: Filter out utility targets from target configuration list
In the build target list there is no reason to have <target>_autogen or <target>_autogen_timestamps targets. Also do not sort the target list, so that the special targets stay at top (all, clean, install etc) Change-Id: I3107150bb40d68cc95246d4d09abc300a6e3d3fc Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -532,8 +532,6 @@ void CMakeBuildStep::recreateBuildTargetsModel()
|
|||||||
if (idx != -1)
|
if (idx != -1)
|
||||||
m_buildTargets[idx] = QString("INSTALL");
|
m_buildTargets[idx] = QString("INSTALL");
|
||||||
}
|
}
|
||||||
|
|
||||||
targetList.sort();
|
|
||||||
targetList.removeDuplicates();
|
targetList.removeDuplicates();
|
||||||
|
|
||||||
addItem(QString(), true);
|
addItem(QString(), true);
|
||||||
|
|||||||
@@ -1051,7 +1051,11 @@ const QList<BuildTargetInfo> CMakeBuildSystem::appTargets() const
|
|||||||
|
|
||||||
QStringList CMakeBuildSystem::buildTargetTitles() const
|
QStringList CMakeBuildSystem::buildTargetTitles() const
|
||||||
{
|
{
|
||||||
return transform(m_buildTargets, &CMakeBuildTarget::title);
|
auto nonUtilityTargets = filtered(m_buildTargets, [this](const CMakeBuildTarget &target){
|
||||||
|
return target.targetType != UtilityType ||
|
||||||
|
CMakeBuildStep::specialTargets(usesAllCapsTargets()).contains(target.title);
|
||||||
|
});
|
||||||
|
return transform(nonUtilityTargets, &CMakeBuildTarget::title);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QList<CMakeBuildTarget> &CMakeBuildSystem::buildTargets() const
|
const QList<CMakeBuildTarget> &CMakeBuildSystem::buildTargets() const
|
||||||
|
|||||||
Reference in New Issue
Block a user