summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-06-04 14:17:18 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-07-07 22:00:17 (GMT)
commit5aa9731c9fa06ca51df1e8bdd5f8625d0ce3776d (patch)
tree874b23ee4349b842c02f11ca08f40047ebcc5871 /Source
parent14eb4a1dc7c858f6b494fad68e15bf42bc4b60be (diff)
downloadCMake-5aa9731c9fa06ca51df1e8bdd5f8625d0ce3776d.zip
CMake-5aa9731c9fa06ca51df1e8bdd5f8625d0ce3776d.tar.gz
CMake-5aa9731c9fa06ca51df1e8bdd5f8625d0ce3776d.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx11
-rw-r--r--Source/cmTarget.cxx16
-rw-r--r--Source/cmTarget.h3
3 files changed, 25 insertions, 5 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 05bbc1c..e2af131 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -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);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a90fa74..f7424a7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6002,6 +6002,22 @@ cmTarget::LinkInterface const* cmTarget::GetLinkInterface(const char* config,
}
//----------------------------------------------------------------------------
+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)
{
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 3bc0ab2..dd28405 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -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. */