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/cmStandardLevelResolver.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/cmStandardLevelResolver.cxx')
-rw-r--r-- | Source/cmStandardLevelResolver.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmStandardLevelResolver.cxx b/Source/cmStandardLevelResolver.cxx index 785f356..be15288 100644 --- a/Source/cmStandardLevelResolver.cxx +++ b/Source/cmStandardLevelResolver.cxx @@ -18,6 +18,7 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmListFileCache.h" #include "cmMakefile.h" #include "cmMessageType.h" #include "cmPolicies.h" @@ -416,7 +417,8 @@ bool cmStandardLevelResolver::AddRequiredTargetFeature( cmTarget* target, const std::string& feature, std::string* error) const { if (cmGeneratorExpression::Find(feature) != std::string::npos) { - target->AppendProperty("COMPILE_FEATURES", feature); + target->AppendProperty("COMPILE_FEATURES", feature, + this->Makefile->GetBacktrace()); return true; } @@ -426,7 +428,8 @@ bool cmStandardLevelResolver::AddRequiredTargetFeature( return false; } - target->AppendProperty("COMPILE_FEATURES", feature); + target->AppendProperty("COMPILE_FEATURES", feature, + this->Makefile->GetBacktrace()); // FIXME: Add a policy to avoid updating the <LANG>_STANDARD target // property due to COMPILE_FEATURES. The language standard selection |