summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2018-06-26 14:21:05 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2018-06-27 16:38:36 (GMT)
commitcc9f88af53b6dd95d3fc1786166dd05599e2ba91 (patch)
tree8d5bb84ed7ec6b6757a87f792c81e6ba7a017f99 /Source/cmGeneratorTarget.cxx
parentb142b721419f5653b7eeea65c5c899970be58812 (diff)
downloadCMake-cc9f88af53b6dd95d3fc1786166dd05599e2ba91.zip
CMake-cc9f88af53b6dd95d3fc1786166dd05599e2ba91.tar.gz
CMake-cc9f88af53b6dd95d3fc1786166dd05599e2ba91.tar.bz2
LINK_DEPENDS: add support for property INTERFACE_LINK_DEPENDS
Fixes: #17997
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx36
1 files changed, 36 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 41e55a5..d4686c2 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3008,6 +3008,42 @@ void cmGeneratorTarget::GetLinkOptions(std::vector<std::string>& result,
}
}
+namespace {
+void processLinkDepends(
+ cmGeneratorTarget const* tgt,
+ const std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries,
+ std::vector<std::string>& options,
+ std::unordered_set<std::string>& uniqueOptions,
+ cmGeneratorExpressionDAGChecker* dagChecker, const std::string& config,
+ std::string const& language)
+{
+ processOptionsInternal(tgt, entries, options, uniqueOptions, dagChecker,
+ config, false, "link depends", language,
+ OptionsParse::None);
+}
+}
+
+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;
+ cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), "LINK_DEPENDS",
+ nullptr, nullptr);
+
+ AddInterfaceEntries(this, config, "INTERFACE_LINK_DEPENDS",
+ linkDependsEntries);
+ processLinkDepends(this, linkDependsEntries, result, uniqueOptions,
+ &dagChecker, config, language);
+
+ cmDeleteAll(linkDependsEntries);
+}
+
void cmGeneratorTarget::ComputeTargetManifest(const std::string& config) const
{
if (this->IsImported()) {