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

Method Follow

Source/cmGeneratorTarget_Link.cxx:1028–1066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1026};
1027
1028void TransitiveLinkImpl::Follow(cmGeneratorTarget const* target)
1029{
1030 if (!target || !this->Followed.insert(target).second) {
1031 return;
1032 }
1033
1034 // Get this target's usage requirements.
1035 cmLinkInterfaceLibraries const* iface =
1036 target->GetLinkInterfaceLibraries(this->Config, this->Self, this->ImplFor);
1037 if (!iface) {
1038 return;
1039 }
1040 if (iface->HadContextSensitiveCondition) {
1041 this->Impl.HadContextSensitiveCondition = true;
1042 }
1043
1044 // Process 'INTERFACE_LINK_LIBRARIES_DIRECT' usage requirements.
1045 for (cmLinkItem const& item : iface->HeadInclude) {
1046 // Inject direct dependencies from the item's usage requirements
1047 // before the item itself.
1048 this->Follow(item.Target);
1049
1050 // Add the item itself, but at most once.
1051 if (this->Emitted.insert(item).second) {
1052 this->Impl.Libraries.emplace_back(item);
1053 }
1054 }
1055
1056 // Follow transitive dependencies.
1057 for (cmLinkItem const& item : iface->Libraries) {
1058 this->Follow(item.Target);
1059 }
1060
1061 // Record exclusions from 'INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE'
1062 // usage requirements.
1063 for (cmLinkItem const& item : iface->HeadExclude) {
1064 this->Excluded.insert(item);
1065 }
1066}
1067
1068void TransitiveLinkImpl::Compute()
1069{

Callers 1

ComputeMethod · 0.95

Calls 3

emplace_backMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected