diff options
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r-- | Source/cmListFileCache.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 3e3d708..2756cd2 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -400,6 +400,11 @@ bool cmListFileParser::AddArgument(cmListFileLexer_Token* token, } } +void cmListFileBacktrace::Append(cmListFileContext const& context) +{ + this->push_back(context); +} + //---------------------------------------------------------------------------- void cmListFileBacktrace::MakeRelative() { @@ -416,6 +421,31 @@ void cmListFileBacktrace::MakeRelative() this->Relative = true; } +void cmListFileBacktrace::PrintTitle(std::ostream& out) +{ + if (this->empty()) + { + return; + } + out << (this->front().Line ? " at " : " in ") << this->front(); +} + +void cmListFileBacktrace::PrintCallStack(std::ostream& out) +{ + if (size() <= 1) + { + return; + } + + const_iterator i = this->begin() + 1; + out << "Call Stack (most recent call first):\n"; + while(i != this->end()) + { + cmListFileContext const& lfc = *i; + out << " " << lfc << "\n"; + ++i; + } +} //---------------------------------------------------------------------------- std::ostream& operator<<(std::ostream& os, cmListFileContext const& lfc) |