cmTarget: Simplify processILibs implementation
Combine the outer two if() conditions into a single one with &&. Scope inner lookup result inside its condition.
This commit is contained in:
parent
7b85938973
commit
e838e0a977
@ -6123,22 +6123,19 @@ void processILibs(const std::string& config,
|
|||||||
std::string const& name,
|
std::string const& name,
|
||||||
std::vector<cmTarget*>& tgts, std::set<cmTarget*>& emitted)
|
std::vector<cmTarget*>& tgts, std::set<cmTarget*>& emitted)
|
||||||
{
|
{
|
||||||
if (cmTarget* tgt = headTarget->GetMakefile()
|
cmTarget* tgt = headTarget->GetMakefile()
|
||||||
->FindTargetToUse(name))
|
->FindTargetToUse(name);
|
||||||
|
if (tgt && emitted.insert(tgt).second)
|
||||||
{
|
{
|
||||||
if (emitted.insert(tgt).second)
|
tgts.push_back(tgt);
|
||||||
|
if(cmTarget::LinkInterface const* iface =
|
||||||
|
tgt->GetLinkInterfaceLibraries(config, headTarget))
|
||||||
{
|
{
|
||||||
tgts.push_back(tgt);
|
for(std::vector<std::string>::const_iterator
|
||||||
cmTarget::LinkInterface const* iface =
|
it = iface->Libraries.begin();
|
||||||
tgt->GetLinkInterfaceLibraries(config, headTarget);
|
it != iface->Libraries.end(); ++it)
|
||||||
if (iface)
|
|
||||||
{
|
{
|
||||||
for(std::vector<std::string>::const_iterator
|
processILibs(config, headTarget, *it, tgts, emitted);
|
||||||
it = iface->Libraries.begin();
|
|
||||||
it != iface->Libraries.end(); ++it)
|
|
||||||
{
|
|
||||||
processILibs(config, headTarget, *it, tgts, emitted);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user