summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-05 18:02:55 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-05 18:12:05 (GMT)
commit43c94281401cfa89bcbe7110727845ed5df984ec (patch)
treebb017d1a95506e624a2c0d108aebff50baced101 /Source
parent863b0a8ee9eb7a19226a37edd1d8a398462379a1 (diff)
downloadCMake-43c94281401cfa89bcbe7110727845ed5df984ec.zip
CMake-43c94281401cfa89bcbe7110727845ed5df984ec.tar.gz
CMake-43c94281401cfa89bcbe7110727845ed5df984ec.tar.bz2
Ninja: Honor the LINK_DEPENDS target property (#14796)
Diffstat (limited to 'Source')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 4e4dc3f..08b2e66 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -209,6 +209,15 @@ cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
result.push_back(this->ConvertToNinjaPath(this->ModuleDefinitionFile));
}
+ // Add user-specified dependencies.
+ if (const char* linkDepends = this->Target->GetProperty("LINK_DEPENDS"))
+ {
+ std::vector<std::string> linkDeps;
+ cmSystemTools::ExpandListArgument(linkDepends, linkDeps);
+ std::transform(linkDeps.begin(), linkDeps.end(),
+ std::back_inserter(result), MapToNinjaPath());
+ }
+
return result;
}