Commit 5aa9731c authored by Stephen Kelly's avatar Stephen Kelly
Browse files

GenexEval: Add abstracted access to link interface for a target.

This can be extended with special handling for static libraries
so that we can process the link dependencies separately from the
usage dependencies.
parent 14eb4a1d
......@@ -900,13 +900,14 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
if (std::find_if(transBegin, transEnd,
TransitiveWhitelistCompare(propertyName)) != transEnd)
{
const cmTarget::LinkInterface *iface = target->GetLinkInterface(
context->Config,
headTarget);
if(iface)
std::vector<std::string> libs;
target->GetTransitivePropertyLinkLibraries(context->Config,
headTarget, libs);
if (!libs.empty())
{
linkedTargetsContent =
getLinkedTargetsContent(iface->Libraries, target,
getLinkedTargetsContent(libs, target,
headTarget,
context, &dagChecker,
interfacePropertyName);
......
......@@ -6001,6 +6001,22 @@ cmTarget::LinkInterface const* cmTarget::GetLinkInterface(const char* config,
return i->second.Exists? &i->second : 0;
}
//----------------------------------------------------------------------------
void cmTarget::GetTransitivePropertyLinkLibraries(
const char* config,
cmTarget *headTarget,
std::vector<std::string> &libs)
{
cmTarget::LinkInterface const* iface = this->GetLinkInterface(config,
headTarget);
if (!iface)
{
return;
}
libs = iface->Libraries;
}
//----------------------------------------------------------------------------
bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
cmTarget *headTarget)
......
......@@ -276,6 +276,9 @@ public:
if the target cannot be linked. */
LinkInterface const* GetLinkInterface(const char* config,
cmTarget *headTarget);
void GetTransitivePropertyLinkLibraries(const char* config,
cmTarget *headTarget,
std::vector<std::string> &libs);
/** The link implementation specifies the direct library
dependencies needed by the object files of the target. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment