VS: Port LinkClosure to cmGeneratorTarget
This commit is contained in:
parent
26e23e8463
commit
ce9e9a92cf
|
@ -303,19 +303,20 @@ std::string cmGlobalVisualStudioGenerator::GetUserMacrosRegKeyBase()
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalVisualStudioGenerator::FillLinkClosure(cmTarget const* target,
|
void cmGlobalVisualStudioGenerator::FillLinkClosure(
|
||||||
|
const cmGeneratorTarget *target,
|
||||||
TargetSet& linked)
|
TargetSet& linked)
|
||||||
{
|
{
|
||||||
if(linked.insert(target).second)
|
if(linked.insert(target->Target).second)
|
||||||
{
|
{
|
||||||
cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
|
TargetDependSet const& depends =
|
||||||
TargetDependSet const& depends = this->GetTargetDirectDepends(gt);
|
this->GetTargetDirectDepends(target);
|
||||||
for(TargetDependSet::const_iterator di = depends.begin();
|
for(TargetDependSet::const_iterator di = depends.begin();
|
||||||
di != depends.end(); ++di)
|
di != depends.end(); ++di)
|
||||||
{
|
{
|
||||||
if(di->IsLink())
|
if(di->IsLink())
|
||||||
{
|
{
|
||||||
this->FillLinkClosure((*di)->Target, linked);
|
this->FillLinkClosure(*di, linked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -323,12 +324,12 @@ void cmGlobalVisualStudioGenerator::FillLinkClosure(cmTarget const* target,
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmGlobalVisualStudioGenerator::TargetSet const&
|
cmGlobalVisualStudioGenerator::TargetSet const&
|
||||||
cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmTarget* target)
|
cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmGeneratorTarget* target)
|
||||||
{
|
{
|
||||||
TargetSetMap::iterator i = this->TargetLinkClosure.find(target);
|
TargetSetMap::iterator i = this->TargetLinkClosure.find(target->Target);
|
||||||
if(i == this->TargetLinkClosure.end())
|
if(i == this->TargetLinkClosure.end())
|
||||||
{
|
{
|
||||||
TargetSetMap::value_type entry(target, TargetSet());
|
TargetSetMap::value_type entry(target->Target, TargetSet());
|
||||||
i = this->TargetLinkClosure.insert(entry).first;
|
i = this->TargetLinkClosure.insert(entry).first;
|
||||||
this->FillLinkClosure(target, i->second);
|
this->FillLinkClosure(target, i->second);
|
||||||
}
|
}
|
||||||
|
@ -461,7 +462,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
|
||||||
TargetSet linked;
|
TargetSet linked;
|
||||||
if(target.GetType() != cmState::STATIC_LIBRARY)
|
if(target.GetType() != cmState::STATIC_LIBRARY)
|
||||||
{
|
{
|
||||||
linked = this->GetTargetLinkClosure(&target);
|
linked = this->GetTargetLinkClosure(gt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emit link dependencies.
|
// Emit link dependencies.
|
||||||
|
|
|
@ -146,8 +146,8 @@ private:
|
||||||
|
|
||||||
class TargetSetMap: public std::map<cmTarget*, TargetSet> {};
|
class TargetSetMap: public std::map<cmTarget*, TargetSet> {};
|
||||||
TargetSetMap TargetLinkClosure;
|
TargetSetMap TargetLinkClosure;
|
||||||
void FillLinkClosure(cmTarget const* target, TargetSet& linked);
|
void FillLinkClosure(cmGeneratorTarget const* target, TargetSet& linked);
|
||||||
TargetSet const& GetTargetLinkClosure(cmTarget* target);
|
TargetSet const& GetTargetLinkClosure(cmGeneratorTarget *target);
|
||||||
};
|
};
|
||||||
|
|
||||||
class cmGlobalVisualStudioGenerator::OrderedTargetDependSet:
|
class cmGlobalVisualStudioGenerator::OrderedTargetDependSet:
|
||||||
|
|
Loading…
Reference in New Issue