summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2018-06-27 16:36:47 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2018-06-27 16:38:36 (GMT)
commit724bd7790e1a28826b5457c0b28edbfff9af4d15 (patch)
treea9f3b1f0ce4e6b53b8beee22ec49272741de508c /Source/cmGeneratorTarget.cxx
parentcc9f88af53b6dd95d3fc1786166dd05599e2ba91 (diff)
downloadCMake-724bd7790e1a28826b5457c0b28edbfff9af4d15.zip
CMake-724bd7790e1a28826b5457c0b28edbfff9af4d15.tar.gz
CMake-724bd7790e1a28826b5457c0b28edbfff9af4d15.tar.bz2
LINK_DEPENDS: add support of 'generator expressions'
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index d4686c2..e07ccd9 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3027,15 +3027,21 @@ void cmGeneratorTarget::GetLinkDepends(std::vector<std::string>& result,
const std::string& config,
const std::string& language) const
{
- if (const char* linkDepends = this->GetProperty("LINK_DEPENDS")) {
- cmSystemTools::ExpandListArgument(linkDepends, result);
- }
-
- std::unordered_set<std::string> uniqueOptions;
std::vector<cmGeneratorTarget::TargetPropertyEntry*> linkDependsEntries;
+ std::unordered_set<std::string> uniqueOptions;
cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), "LINK_DEPENDS",
nullptr, nullptr);
+ if (const char* linkDepends = this->GetProperty("LINK_DEPENDS")) {
+ std::vector<std::string> depends;
+ cmGeneratorExpression ge;
+ cmSystemTools::ExpandListArgument(linkDepends, depends);
+ for (const auto& depend : depends) {
+ std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(depend);
+ linkDependsEntries.push_back(
+ new cmGeneratorTarget::TargetPropertyEntry(std::move(cge)));
+ }
+ }
AddInterfaceEntries(this, config, "INTERFACE_LINK_DEPENDS",
linkDependsEntries);
processLinkDepends(this, linkDependsEntries, result, uniqueOptions,