MCPcopy Create free account
hub / github.com/Kitware/CMake / GetTargetsForProject

Method GetTargetsForProject

Source/cmGlobalGenerator.cxx:3632–3654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3630}
3631
3632cmGlobalGenerator::TargetDependSet cmGlobalGenerator::GetTargetsForProject(
3633 cmLocalGenerator const* root,
3634 std::vector<cmLocalGenerator*> const& generators) const
3635{
3636 TargetDependSet projectTargets;
3637 // loop over all local generators
3638 for (auto* generator : generators) {
3639 // check to make sure generator is not excluded
3640 if (this->IsExcluded(root, generator)) {
3641 continue;
3642 }
3643 // loop over all the generator targets in the makefile
3644 for (auto const& target : generator->GetGeneratorTargets()) {
3645 if (this->IsRootOnlyTarget(target.get()) &&
3646 target->GetLocalGenerator() != root) {
3647 continue;
3648 }
3649 // Get the set of targets that depend on target
3650 this->AddTargetDepends(target.get(), projectTargets);
3651 }
3652 }
3653 return projectTargets;
3654}
3655
3656bool cmGlobalGenerator::IsRootOnlyTarget(cmGeneratorTarget* target) const
3657{

Callers 2

OutputTopLevelProjectMethod · 0.80
GenerateSolutionMethod · 0.80

Calls 5

IsExcludedMethod · 0.95
IsRootOnlyTargetMethod · 0.95
AddTargetDependsMethod · 0.95
getMethod · 0.45
GetLocalGeneratorMethod · 0.45

Tested by

no test coverage detected