forked from qt-creator/qt-creator
CMake: Avoid duplicate build targets
Make sure that build targets that get added explicitly are never reported by any of the readers, too. This makes sure entries will not show up twice in the UI. Task-number: QTCREATORBUG-18409 Change-Id: Id5039add262211fd87cd5c2884df2af0fcf24577 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -336,7 +336,12 @@ QList<CMakeBuildTarget> BuildDirManager::buildTargets() const
|
|||||||
m_buildTargets.append(utilityTarget(CMakeBuildStep::installTarget(), this));
|
m_buildTargets.append(utilityTarget(CMakeBuildStep::installTarget(), this));
|
||||||
m_buildTargets.append(utilityTarget(CMakeBuildStep::testTarget(), this));
|
m_buildTargets.append(utilityTarget(CMakeBuildStep::testTarget(), this));
|
||||||
|
|
||||||
m_buildTargets.append(m_reader->buildTargets());
|
m_buildTargets.append(Utils::filtered(m_reader->buildTargets(), [](const CMakeBuildTarget &bt) {
|
||||||
|
return bt.title == CMakeBuildStep::allTarget()
|
||||||
|
|| bt.title == CMakeBuildStep::cleanTarget()
|
||||||
|
|| bt.title == CMakeBuildStep::installTarget()
|
||||||
|
|| bt.title == CMakeBuildStep::testTarget();
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
return m_buildTargets;
|
return m_buildTargets;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user