summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetPrecompileHeadersCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-08-22 14:58:46 (GMT)
committerBrad King <brad.king@kitware.com>2022-08-22 19:29:43 (GMT)
commit52c95540b722926ba833ead05a575189bdabf84e (patch)
treeb620d3dfeaabb69d61a9e3c2413a0d73692d6968 /Source/cmTargetPrecompileHeadersCommand.cxx
parent0d64c3abd13a0b14f1a14b7717dbac8988d12256 (diff)
downloadCMake-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/cmTargetPrecompileHeadersCommand.cxx')
-rw-r--r--Source/cmTargetPrecompileHeadersCommand.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmTargetPrecompileHeadersCommand.cxx b/Source/cmTargetPrecompileHeadersCommand.cxx
index a5066cc..4dd158d 100644
--- a/Source/cmTargetPrecompileHeadersCommand.cxx
+++ b/Source/cmTargetPrecompileHeadersCommand.cxx
@@ -5,6 +5,7 @@
#include <utility>
#include "cmGeneratorExpression.h"
+#include "cmListFileCache.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
#include "cmStringAlgorithms.h"
@@ -48,7 +49,8 @@ private:
{
std::string const& base = this->Makefile->GetCurrentSourceDirectory();
tgt->AppendProperty("PRECOMPILE_HEADERS",
- this->Join(ConvertToAbsoluteContent(content, base)));
+ this->Join(ConvertToAbsoluteContent(content, base)),
+ this->Makefile->GetBacktrace());
return true;
}