summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-21 17:51:35 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-29 21:12:33 (GMT)
commite8b0359a4318bb682c96e527de7ed7f5be02c38f (patch)
tree5ea4137b78124e4619bb4aff1856a04b729f93fd /Source/cmListFileCache.cxx
parent98805494055f8fb4afc2da9f96a487987333981a (diff)
downloadCMake-e8b0359a4318bb682c96e527de7ed7f5be02c38f.zip
CMake-e8b0359a4318bb682c96e527de7ed7f5be02c38f.tar.gz
CMake-e8b0359a4318bb682c96e527de7ed7f5be02c38f.tar.bz2
cmake_language: Add signature to DEFER calls to later times
Fixes: #19575
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r--Source/cmListFileCache.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 7ebb02f..d678b56 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -446,7 +446,8 @@ void cmListFileBacktrace::PrintCallStack(std::ostream& out) const
cmStateSnapshot bottom = this->GetBottom();
for (Entry const* cur = this->TopEntry->Parent.get(); !cur->IsBottom();
cur = cur->Parent.get()) {
- if (cur->Context.Name.empty()) {
+ if (cur->Context.Name.empty() &&
+ cur->Context.Line != cmListFileContext::DeferPlaceholderLine) {
// Skip this whole-file scope. When we get here we already will
// have printed a more-specific context within the file.
continue;
@@ -483,11 +484,13 @@ bool cmListFileBacktrace::Empty() const
std::ostream& operator<<(std::ostream& os, cmListFileContext const& lfc)
{
os << lfc.FilePath;
- if (lfc.Line) {
+ if (lfc.Line > 0) {
os << ":" << lfc.Line;
if (!lfc.Name.empty()) {
os << " (" << lfc.Name << ")";
}
+ } else if (lfc.Line == cmListFileContext::DeferPlaceholderLine) {
+ os << ":DEFERRED";
}
return os;
}