cmComputeLinkDepends: Port result API to cmGeneratorTarget.

This commit is contained in:
Stephen Kelly 2015-10-08 00:54:18 +02:00
parent 7c8236efa7
commit d6b394edcb
3 changed files with 10 additions and 10 deletions

View File

@ -982,6 +982,7 @@ void cmComputeLinkDepends::CheckWrongConfigItem(cmLinkItem const& item)
// directories. // directories.
if(item.Target && !item.Target->IsImported()) if(item.Target && !item.Target->IsImported())
{ {
this->OldWrongConfigItems.insert(item.Target); this->OldWrongConfigItems.insert(
this->GlobalGenerator->GetGeneratorTarget(item.Target));
} }
} }

View File

@ -52,7 +52,7 @@ public:
EntryVector const& Compute(); EntryVector const& Compute();
void SetOldLinkDirMode(bool b); void SetOldLinkDirMode(bool b);
std::set<cmTarget const*> const& GetOldWrongConfigItems() const std::set<cmGeneratorTarget const*> const& GetOldWrongConfigItems() const
{ return this->OldWrongConfigItems; } { return this->OldWrongConfigItems; }
private: private:
@ -150,7 +150,7 @@ private:
// Record of the original link line. // Record of the original link line.
std::vector<int> OriginalEntries; std::vector<int> OriginalEntries;
std::set<cmTarget const*> OldWrongConfigItems; std::set<cmGeneratorTarget const*> OldWrongConfigItems;
void CheckWrongConfigItem(cmLinkItem const& item); void CheckWrongConfigItem(cmLinkItem const& item);
int ComponentOrderId; int ComponentOrderId;

View File

@ -19,7 +19,6 @@
#include "cmState.h" #include "cmState.h"
#include "cmOutputConverter.h" #include "cmOutputConverter.h"
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmTarget.h"
#include "cmGeneratorTarget.h" #include "cmGeneratorTarget.h"
#include "cmake.h" #include "cmake.h"
#include "cmAlgorithms.h" #include "cmAlgorithms.h"
@ -537,16 +536,16 @@ bool cmComputeLinkInformation::Compute()
// For CMake 2.4 bug-compatibility we need to consider the output // For CMake 2.4 bug-compatibility we need to consider the output
// directories of targets linked in another configuration as link // directories of targets linked in another configuration as link
// directories. // directories.
std::set<cmTarget const*> const& wrongItems = cld.GetOldWrongConfigItems(); std::set<cmGeneratorTarget const*> const& wrongItems =
for(std::set<cmTarget const*>::const_iterator i = wrongItems.begin(); cld.GetOldWrongConfigItems();
i != wrongItems.end(); ++i) for(std::set<cmGeneratorTarget const*>::const_iterator i =
wrongItems.begin(); i != wrongItems.end(); ++i)
{ {
cmTarget const* tgt = *i; cmGeneratorTarget const* tgt = *i;
cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt);
bool implib = bool implib =
(this->UseImportLibrary && (this->UseImportLibrary &&
(tgt->GetType() == cmTarget::SHARED_LIBRARY)); (tgt->GetType() == cmTarget::SHARED_LIBRARY));
std::string lib = gtgt->GetFullPath(this->Config , implib, true); std::string lib = tgt->GetFullPath(this->Config , implib, true);
this->OldLinkDirItems.push_back(lib); this->OldLinkDirItems.push_back(lib);
} }
} }