summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkDepends.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-06 20:25:20 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-06 20:25:20 (GMT)
commit06b0a692f45288eb4c8f3da9cde719583d2584be (patch)
tree2e08ee425f1aa3f14fabc91677359faefe83d5b4 /Source/cmComputeLinkDepends.cxx
parent26df00f83a73821e39e20624d3ca7f66fdd4db97 (diff)
downloadCMake-06b0a692f45288eb4c8f3da9cde719583d2584be.zip
CMake-06b0a692f45288eb4c8f3da9cde719583d2584be.tar.gz
CMake-06b0a692f45288eb4c8f3da9cde719583d2584be.tar.bz2
ENH: Centralize default link interface computation
When LINK_INTERFACE_LIBRARIES is not set we use the link implementation to implicitly define the link interface. These changes centralize the decision so that all linkable targets internally have a link interface.
Diffstat (limited to 'Source/cmComputeLinkDepends.cxx')
-rw-r--r--Source/cmComputeLinkDepends.cxx27
1 files changed, 13 insertions, 14 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 406761f..52f4cc8 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -223,7 +223,7 @@ std::vector<cmComputeLinkDepends::LinkEntry> const&
cmComputeLinkDepends::Compute()
{
// Follow the link dependencies of the target to be linked.
- this->AddTargetLinkEntries(-1, this->Target->GetOriginalLinkLibraries());
+ this->AddDirectLinkEntries();
// Complete the breadth-first search of dependencies.
while(!this->BFSQueue.empty())
@@ -364,13 +364,14 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
// Handle dependent shared libraries.
this->QueueSharedDependencies(depender_index, iface->SharedDeps);
- }
- else if(!entry.Target->IsImported() &&
- entry.Target->GetType() != cmTarget::EXECUTABLE)
- {
- // Use the target's link implementation as the interface.
- this->AddTargetLinkEntries(depender_index,
- entry.Target->GetOriginalLinkLibraries());
+
+ // Support for CMP0003.
+ for(std::vector<std::string>::const_iterator
+ oi = iface->WrongConfigLibraries.begin();
+ oi != iface->WrongConfigLibraries.end(); ++oi)
+ {
+ this->CheckWrongConfigItem(depender_index, *oi);
+ }
}
}
else
@@ -516,11 +517,11 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
}
//----------------------------------------------------------------------------
-void
-cmComputeLinkDepends::AddTargetLinkEntries(int depender_index,
- LinkLibraryVectorType const& libs)
+void cmComputeLinkDepends::AddDirectLinkEntries()
{
- // Look for entries meant for this configuration.
+ // Add direct link dependencies in this configuration.
+ int depender_index = -1;
+ LinkLibraryVectorType const& libs=this->Target->GetOriginalLinkLibraries();
std::vector<std::string> actual_libs;
for(cmTarget::LinkLibraryVectorType::const_iterator li = libs.begin();
li != libs.end(); ++li)
@@ -534,8 +535,6 @@ cmComputeLinkDepends::AddTargetLinkEntries(int depender_index,
this->CheckWrongConfigItem(depender_index, li->first);
}
}
-
- // Add these entries.
this->AddLinkEntries(depender_index, actual_libs);
}