|
|
@@ -358,7 +358,7 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
|
|
|
this->AddLinkEntries(depender_index, iface->Libraries);
|
|
|
|
|
|
// Handle dependent shared libraries.
|
|
|
- this->QueueSharedDependencies(depender_index, iface->SharedDeps);
|
|
|
+ this->FollowSharedDeps(depender_index, iface);
|
|
|
|
|
|
// Support for CMP0003.
|
|
|
for(std::vector<std::string>::const_iterator
|
|
|
@@ -376,6 +376,23 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
+void
|
|
|
+cmComputeLinkDepends
|
|
|
+::FollowSharedDeps(int depender_index, cmTarget::LinkInterface const* iface,
|
|
|
+ bool follow_interface)
|
|
|
+{
|
|
|
+ // Follow dependencies if we have not followed them already.
|
|
|
+ if(this->SharedDepFollowed.insert(depender_index).second)
|
|
|
+ {
|
|
|
+ if(follow_interface)
|
|
|
+ {
|
|
|
+ this->QueueSharedDependencies(depender_index, iface->Libraries);
|
|
|
+ }
|
|
|
+ this->QueueSharedDependencies(depender_index, iface->SharedDeps);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
//----------------------------------------------------------------------------
|
|
|
void
|
|
|
cmComputeLinkDepends
|
|
|
@@ -430,8 +447,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
|
|
|
entry.Target->GetLinkInterface(this->Config))
|
|
|
{
|
|
|
// Follow public and private dependencies transitively.
|
|
|
- this->QueueSharedDependencies(index, iface->Libraries);
|
|
|
- this->QueueSharedDependencies(index, iface->SharedDeps);
|
|
|
+ this->FollowSharedDeps(index, iface, true);
|
|
|
}
|
|
|
}
|
|
|
}
|