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

Method FollowLinkEntry

Source/cmComputeLinkDepends.cxx:847–881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

845}
846
847void cmComputeLinkDepends::FollowLinkEntry(BFSEntry qe)
848{
849 // Get this entry representation.
850 size_t depender_index = qe.GroupIndex ? *qe.GroupIndex : qe.Index;
851 LinkEntry const& entry = this->EntryList[qe.Index];
852
853 // Follow the item's dependencies.
854 if (entry.Target) {
855 // Follow the target dependencies.
856 if (cmLinkInterface const* iface =
857 entry.Target->GetLinkInterface(this->Config, this->Target)) {
858 bool const isIface =
859 entry.Target->GetType() == cmStateEnums::INTERFACE_LIBRARY;
860 // This target provides its own link interface information.
861 this->AddLinkEntries(depender_index, iface->Libraries);
862 this->AddLinkObjects(iface->Objects);
863 for (auto const& language : iface->Languages) {
864 auto runtimeEntries = iface->LanguageRuntimeLibraries.find(language);
865 if (runtimeEntries != iface->LanguageRuntimeLibraries.end()) {
866 this->AddLinkEntries(depender_index, runtimeEntries->second);
867 }
868 }
869
870 if (isIface) {
871 return;
872 }
873
874 // Handle dependent shared libraries.
875 this->FollowSharedDeps(depender_index, iface);
876 }
877 } else {
878 // Follow the old-style dependency list.
879 this->AddVarLinkEntries(depender_index, qe.LibDepends);
880 }
881}
882
883void cmComputeLinkDepends::FollowSharedDeps(size_t depender_index,
884 cmLinkInterface const* iface,

Callers 1

Calls 8

AddLinkEntriesMethod · 0.95
AddLinkObjectsMethod · 0.95
FollowSharedDepsMethod · 0.95
AddVarLinkEntriesMethod · 0.95
GetLinkInterfaceMethod · 0.80
GetTypeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected