ENH: Use new link info during dependency scanning

This removes another use of the old-style link line computation.
This commit is contained in:
Brad King 2008-09-15 13:30:17 -04:00
parent 4f6137c70c
commit 434d07afe6
1 changed files with 7 additions and 7 deletions

View File

@ -948,16 +948,16 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
<< "\n" << "\n"
<< "# Targets to which this target links.\n" << "# Targets to which this target links.\n"
<< "SET(CMAKE_TARGET_LINKED_INFO_FILES\n"; << "SET(CMAKE_TARGET_LINKED_INFO_FILES\n";
cmGlobalGenerator* gg = this->GlobalGenerator;
std::set<cmTarget const*> emitted; std::set<cmTarget const*> emitted;
cmTarget::LinkLibraryVectorType const& libs = const char* cfg = this->LocalGenerator->ConfigurationName.c_str();
this->Target->GetLinkLibraries(); if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
for(cmTarget::LinkLibraryVectorType::const_iterator j = libs.begin();
j != libs.end(); ++j)
{ {
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(); cmMakefile* mf = linkee->GetMakefile();
cmLocalGenerator* lg = mf->GetLocalGenerator(); cmLocalGenerator* lg = mf->GetLocalGenerator();