cmGeneratorTarget: Move AddInterfaceEntries method.

It will be needed here in a follow-up commit.
This commit is contained in:
Stephen Kelly 2015-09-13 09:45:41 +02:00
parent da1b0449d9
commit 33f87bb1f5
1 changed files with 27 additions and 28 deletions

View File

@ -811,6 +811,33 @@ bool cmGeneratorTarget::GetPropertyAsBool(const std::string& prop) const
return this->Target->GetPropertyAsBool(prop);
}
//----------------------------------------------------------------------------
static void AddInterfaceEntries(
cmGeneratorTarget const* thisTarget, std::string const& config,
std::string const& prop,
std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries)
{
if(cmLinkImplementationLibraries const* impl =
thisTarget->Target->GetLinkImplementationLibraries(config))
{
for (std::vector<cmLinkImplItem>::const_iterator
it = impl->Libraries.begin(), end = impl->Libraries.end();
it != end; ++it)
{
if(it->Target)
{
std::string genex =
"$<TARGET_PROPERTY:" + *it + "," + prop + ">";
cmGeneratorExpression ge(it->Backtrace);
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(genex);
cge->SetEvaluateForBuildsystem(true);
entries.push_back(
new cmGeneratorTarget::TargetPropertyEntry(cge, *it));
}
}
}
}
//----------------------------------------------------------------------------
void cmGeneratorTarget::GetSourceFiles(std::vector<cmSourceFile*> &files,
const std::string& config) const
@ -2177,34 +2204,6 @@ static void processIncludeDirectories(cmGeneratorTarget const* tgt,
}
}
//----------------------------------------------------------------------------
static void AddInterfaceEntries(
cmGeneratorTarget const* thisTarget, std::string const& config,
std::string const& prop,
std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries)
{
if(cmLinkImplementationLibraries const* impl =
thisTarget->Target->GetLinkImplementationLibraries(config))
{
for (std::vector<cmLinkImplItem>::const_iterator
it = impl->Libraries.begin(), end = impl->Libraries.end();
it != end; ++it)
{
if(it->Target)
{
std::string genex =
"$<TARGET_PROPERTY:" + *it + "," + prop + ">";
cmGeneratorExpression ge(it->Backtrace);
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(genex);
cge->SetEvaluateForBuildsystem(true);
entries.push_back(
new cmGeneratorTarget::TargetPropertyEntry(cge, *it));
}
}
}
}
//----------------------------------------------------------------------------
std::vector<std::string>
cmGeneratorTarget::GetIncludeDirectories(const std::string& config,