cmGeneratorTarget: Port GetLinkInterface away from cmTarget.

This commit is contained in:
Stephen Kelly 2015-09-16 04:49:37 +02:00
parent eaa5b9cbb1
commit 922c89014f
5 changed files with 13 additions and 13 deletions

View File

@ -365,7 +365,7 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
{ {
// Follow the target dependencies. // Follow the target dependencies.
if(cmLinkInterface const* iface = if(cmLinkInterface const* iface =
entry.Target->GetLinkInterface(this->Config, this->Target->Target)) entry.Target->GetLinkInterface(this->Config, this->Target))
{ {
const bool isIface = const bool isIface =
entry.Target->GetType() == cmTarget::INTERFACE_LIBRARY; entry.Target->GetType() == cmTarget::INTERFACE_LIBRARY;
@ -465,7 +465,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
if(entry.Target) if(entry.Target)
{ {
if(cmLinkInterface const* iface = if(cmLinkInterface const* iface =
entry.Target->GetLinkInterface(this->Config, this->Target->Target)) entry.Target->GetLinkInterface(this->Config, this->Target))
{ {
// Follow public and private dependencies transitively. // Follow public and private dependencies transitively.
this->FollowSharedDeps(index, iface, true); this->FollowSharedDeps(index, iface, true);
@ -937,7 +937,7 @@ int cmComputeLinkDepends::ComputeComponentCount(NodeList const& nl)
if(cmGeneratorTarget const* target = this->EntryList[*ni].Target) if(cmGeneratorTarget const* target = this->EntryList[*ni].Target)
{ {
if(cmLinkInterface const* iface = if(cmLinkInterface const* iface =
target->GetLinkInterface(this->Config, this->Target->Target)) target->GetLinkInterface(this->Config, this->Target))
{ {
if(iface->Multiplicity > count) if(iface->Multiplicity > count)
{ {

View File

@ -297,7 +297,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
cmGeneratorTarget const* depender = this->Targets[depender_index]; cmGeneratorTarget const* depender = this->Targets[depender_index];
if(cmLinkInterface const* iface = if(cmLinkInterface const* iface =
dependee->GetLinkInterface(config, dependee->GetLinkInterface(config,
depender->Target)) depender))
{ {
for(std::vector<cmLinkItem>::const_iterator for(std::vector<cmLinkItem>::const_iterator
lib = iface->Libraries.begin(); lib = iface->Libraries.begin();

View File

@ -799,7 +799,7 @@ cmExportFileGenerator
{ {
// Add the transitive link dependencies for this configuration. // Add the transitive link dependencies for this configuration.
cmLinkInterface const* iface = target->GetLinkInterface(config, cmLinkInterface const* iface = target->GetLinkInterface(config,
target->Target); target);
if (!iface) if (!iface)
{ {
return; return;
@ -911,7 +911,7 @@ cmExportFileGenerator
// Add the transitive link dependencies for this configuration. // Add the transitive link dependencies for this configuration.
if(cmLinkInterface const* iface = if(cmLinkInterface const* iface =
target->GetLinkInterface(config, target->Target)) target->GetLinkInterface(config, target))
{ {
this->SetImportLinkProperty(suffix, target, this->SetImportLinkProperty(suffix, target,
"IMPORTED_LINK_INTERFACE_LANGUAGES", "IMPORTED_LINK_INTERFACE_LANGUAGES",

View File

@ -1719,7 +1719,7 @@ public:
this->Target->GetLocalGenerator()->GetGlobalGenerator() this->Target->GetLocalGenerator()->GetGlobalGenerator()
->GetGeneratorTarget(item.Target); ->GetGeneratorTarget(item.Target);
cmLinkInterface const* iface = cmLinkInterface const* iface =
gtgt->GetLinkInterface(this->Config, this->HeadTarget->Target); gtgt->GetLinkInterface(this->Config, this->HeadTarget);
if(!iface) { return; } if(!iface) { return; }
for(std::vector<std::string>::const_iterator for(std::vector<std::string>::const_iterator
@ -4446,12 +4446,12 @@ void cmGeneratorTarget::ExpandLinkItems(std::string const& prop,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmLinkInterface const* cmLinkInterface const*
cmGeneratorTarget::GetLinkInterface(const std::string& config, cmGeneratorTarget::GetLinkInterface(const std::string& config,
cmTarget const* head) const cmGeneratorTarget const* head) const
{ {
// Imported targets have their own link interface. // Imported targets have their own link interface.
if(this->IsImported()) if(this->IsImported())
{ {
return this->GetImportLinkInterface(config, head, false); return this->GetImportLinkInterface(config, head->Target, false);
} }
// Link interfaces are not supported for executables that do not // Link interfaces are not supported for executables that do not
@ -4473,19 +4473,19 @@ cmGeneratorTarget::GetLinkInterface(const std::string& config,
return &hm.begin()->second; return &hm.begin()->second;
} }
cmOptionalLinkInterface& iface = hm[head]; cmOptionalLinkInterface& iface = hm[head->Target];
if(!iface.LibrariesDone) if(!iface.LibrariesDone)
{ {
iface.LibrariesDone = true; iface.LibrariesDone = true;
this->ComputeLinkInterfaceLibraries( this->ComputeLinkInterfaceLibraries(
config, iface, head, false); config, iface, head->Target, false);
} }
if(!iface.AllDone) if(!iface.AllDone)
{ {
iface.AllDone = true; iface.AllDone = true;
if(iface.Exists) if(iface.Exists)
{ {
this->ComputeLinkInterface(config, iface, head); this->ComputeLinkInterface(config, iface, head->Target);
} }
} }

View File

@ -109,7 +109,7 @@ public:
const std::string& config) const; const std::string& config) const;
cmLinkInterface const* GetLinkInterface(const std::string& config, cmLinkInterface const* GetLinkInterface(const std::string& config,
cmTarget const* headTarget) const; const cmGeneratorTarget* headTarget) const;
void ComputeLinkInterface(const std::string& config, void ComputeLinkInterface(const std::string& config,
cmOptionalLinkInterface& iface, cmOptionalLinkInterface& iface,
cmTarget const* head) const; cmTarget const* head) const;