diff options
author | Brad King <brad.king@kitware.com> | 2022-08-22 14:58:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-22 19:29:43 (GMT) |
commit | 52c95540b722926ba833ead05a575189bdabf84e (patch) | |
tree | b620d3dfeaabb69d61a9e3c2413a0d73692d6968 /Source/cmTargetLinkLibrariesCommand.cxx | |
parent | 0d64c3abd13a0b14f1a14b7717dbac8988d12256 (diff) | |
download | CMake-52c95540b722926ba833ead05a575189bdabf84e.zip CMake-52c95540b722926ba833ead05a575189bdabf84e.tar.gz CMake-52c95540b722926ba833ead05a575189bdabf84e.tar.bz2 |
target_*: Fix cross-directory call backtraces
Record the call-site backtrace, not the current backtrace of the
target's directory.
Fixes: #23873
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index ba901d0..fb03b62 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -625,7 +625,7 @@ bool TLL::HandleLibrary(ProcessingState currentProcessingState, void TLL::AppendProperty(std::string const& prop, std::string const& value) { this->AffectsProperty(prop); - this->Target->AppendProperty(prop, value); + this->Target->AppendProperty(prop, value, this->Makefile.GetBacktrace()); } void TLL::AffectsProperty(std::string const& prop) @@ -636,14 +636,16 @@ void TLL::AffectsProperty(std::string const& prop) // Add a wrapper to the expression to tell LookupLinkItem to look up // names in the caller's directory. if (this->Props.insert(prop).second) { - this->Target->AppendProperty(prop, this->DirectoryId); + this->Target->AppendProperty(prop, this->DirectoryId, + this->Makefile.GetBacktrace()); } } TLL::~TLL() { for (std::string const& prop : this->Props) { - this->Target->AppendProperty(prop, CMAKE_DIRECTORY_ID_SEP); + this->Target->AppendProperty(prop, CMAKE_DIRECTORY_ID_SEP, + this->Makefile.GetBacktrace()); } } |