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

Method FindTargetImpl

Source/cmGlobalGenerator.cxx:2765–2779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2763}
2764
2765cmTarget* cmGlobalGenerator::FindTargetImpl(
2766 std::string const& name, cmStateEnums::TargetDomainSet domains) const
2767{
2768 bool const useForeign =
2769 domains.contains(cmStateEnums::TargetDomain::FOREIGN);
2770 bool const useNative = domains.contains(cmStateEnums::TargetDomain::NATIVE);
2771
2772 auto const it = this->TargetSearchIndex.find(name);
2773 if (it != this->TargetSearchIndex.end()) {
2774 if (it->second->IsForeign() ? useForeign : useNative) {
2775 return it->second;
2776 }
2777 }
2778 return nullptr;
2779}
2780
2781cmGeneratorTarget* cmGlobalGenerator::FindGeneratorTargetImpl(
2782 std::string const& name) const

Callers 1

FindTargetMethod · 0.95

Calls 3

findMethod · 0.45
endMethod · 0.45
IsForeignMethod · 0.45

Tested by

no test coverage detected