From 251e835b3f7320f0099d003de5a675af58e62e46 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 30 Jun 2014 10:43:36 -0400 Subject: [PATCH] cmTarget: Add to LinkImplementation a backtrace for each library Allow clients to provide backtrace context on evaluation diagnostics. --- Source/cmTarget.cxx | 2 +- Source/cmTarget.h | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 94b339b5e..6bc427397 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6677,7 +6677,7 @@ void cmTarget::ComputeLinkImplementation(const std::string& config, // The entry is meant for this configuration. impl.Libraries.push_back( - cmLinkImplItem(name, this->FindTargetToLink(name))); + cmLinkImplItem(name, this->FindTargetToLink(name), le->Backtrace)); } std::set const& seenProps = cge->GetSeenTargetProperties(); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 8578c5152..5f2a5574a 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -57,12 +57,14 @@ public: class cmLinkImplItem: public cmLinkItem { public: - cmLinkImplItem(): cmLinkItem() {} + cmLinkImplItem(): cmLinkItem(), Backtrace(0) {} cmLinkImplItem(std::string const& n, - cmTarget const* t): - cmLinkItem(n, t) {} + cmTarget const* t, + cmListFileBacktrace const& bt): + cmLinkItem(n, t), Backtrace(bt) {} cmLinkImplItem(cmLinkImplItem const& r): - cmLinkItem(r) {} + cmLinkItem(r), Backtrace(r.Backtrace) {} + cmListFileBacktrace Backtrace; }; struct cmTargetLinkInformationMap: