summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-17 10:25:20 -0400
committerBrad King <brad.king@kitware.com>2018-10-18 08:10:55 -0400
commita6e02f881dc5e74d79201f761fb28c99a9e7d2af (patch)
treea71f752171ef570eff69ec6cc545671ba25a9db0 /Source/cmGeneratorTarget.cxx
parenta093b1a4f3c8c40c55c50ad8e701ceb599961140 (diff)
downloadcmake-a6e02f881dc5e74d79201f761fb28c99a9e7d2af.tar.gz
add_dependencies: Track backtraces internally
Record backtraces for "utility" dependencies created by `add_dependencies` calls.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx21
1 files changed, 6 insertions, 15 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 6ce6512378..fa489e20b3 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -674,16 +674,13 @@ std::set<cmLinkItem> const& cmGeneratorTarget::GetUtilityItems() const
{
if (!this->UtilityItemsDone) {
this->UtilityItemsDone = true;
- std::set<std::string> const& utilities = this->GetUtilities();
- for (std::string const& i : utilities) {
- cmListFileBacktrace const* bt = this->GetUtilityBacktrace(i);
+ std::set<BT<std::string>> const& utilities = this->GetUtilities();
+ for (BT<std::string> const& i : utilities) {
if (cmGeneratorTarget* gt =
- this->LocalGenerator->FindGeneratorTargetToUse(i)) {
- this->UtilityItems.insert(
- cmLinkItem(gt, bt ? *bt : cmListFileBacktrace()));
+ this->LocalGenerator->FindGeneratorTargetToUse(i.Value)) {
+ this->UtilityItems.insert(cmLinkItem(gt, i.Backtrace));
} else {
- this->UtilityItems.insert(
- cmLinkItem(i, bt ? *bt : cmListFileBacktrace()));
+ this->UtilityItems.insert(cmLinkItem(i.Value, i.Backtrace));
}
}
}
@@ -1713,17 +1710,11 @@ cmListFileBacktrace cmGeneratorTarget::GetBacktrace() const
return this->Target->GetBacktrace();
}
-const std::set<std::string>& cmGeneratorTarget::GetUtilities() const
+const std::set<BT<std::string>>& cmGeneratorTarget::GetUtilities() const
{
return this->Target->GetUtilities();
}
-const cmListFileBacktrace* cmGeneratorTarget::GetUtilityBacktrace(
- const std::string& u) const
-{
- return this->Target->GetUtilityBacktrace(u);
-}
-
bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const
{
return this->GetType() == cmStateEnums::STATIC_LIBRARY ||