summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-09-15 17:30:17 (GMT)
committerBrad King <brad.king@kitware.com>2008-09-15 17:30:17 (GMT)
commit434d07afe61cbcc7365ab1faca6c3420bf382437 (patch)
tree1a83182037f5fa5867802368ad0711803245dc6b
parent4f6137c70c6d473243ed99838820119138fc1c96 (diff)
downloadCMake-434d07afe61cbcc7365ab1faca6c3420bf382437.zip
CMake-434d07afe61cbcc7365ab1faca6c3420bf382437.tar.gz
CMake-434d07afe61cbcc7365ab1faca6c3420bf382437.tar.bz2
ENH: Use new link info during dependency scanning
This removes another use of the old-style link line computation.
-rw-r--r--Source/cmMakefileTargetGenerator.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 7d2450d..962cdfa 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -948,16 +948,16 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
<< "\n"
<< "# Targets to which this target links.\n"
<< "SET(CMAKE_TARGET_LINKED_INFO_FILES\n";
- cmGlobalGenerator* gg = this->GlobalGenerator;
std::set<cmTarget const*> emitted;
- cmTarget::LinkLibraryVectorType const& libs =
- this->Target->GetLinkLibraries();
- for(cmTarget::LinkLibraryVectorType::const_iterator j = libs.begin();
- j != libs.end(); ++j)
+ const char* cfg = this->LocalGenerator->ConfigurationName.c_str();
+ if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
{
- if(cmTarget const* linkee = gg->FindTarget(0, j->first.c_str()))
+ cmComputeLinkInformation::ItemVector const& items = cli->GetItems();
+ for(cmComputeLinkInformation::ItemVector::const_iterator
+ i = items.begin(); i != items.end(); ++i)
{
- if(emitted.insert(linkee).second)
+ cmTarget const* linkee = i->Target;
+ if(linkee && !linkee->IsImported() && emitted.insert(linkee).second)
{
cmMakefile* mf = linkee->GetMakefile();
cmLocalGenerator* lg = mf->GetLocalGenerator();