summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-18 19:33:38 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-18 21:56:00 (GMT)
commit61d52e6e77bef903225bd3bad3e381bac73ee557 (patch)
tree40b42b258872096cab15ca5aaac95edc1a2a089d /Source/cmake.cxx
parenta271f7f17707c50744c2dbeb20ae82b10c886f4f (diff)
downloadCMake-61d52e6e77bef903225bd3bad3e381bac73ee557.zip
CMake-61d52e6e77bef903225bd3bad3e381bac73ee557.tar.gz
CMake-61d52e6e77bef903225bd3bad3e381bac73ee557.tar.bz2
cmListFileBacktrace: Hide the context-stack implementation detail.
The backtrace will soon not be implemented in terms of a stack of cmListFileContext objects. Keep the cmListFileContext in the API for convenience for now.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx19
1 files changed, 2 insertions, 17 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 5c5c428..e447105 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2485,13 +2485,7 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text,
}
// Add the immediate context.
- cmListFileBacktrace::const_iterator i = backtrace.begin();
- if(i != backtrace.end())
- {
- cmListFileContext const& lfc = *i;
- msg << (lfc.Line? " at ": " in ") << lfc;
- ++i;
- }
+ backtrace.PrintTitle(msg);
// Add the message text.
{
@@ -2502,16 +2496,7 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text,
}
// Add the rest of the context.
- if(i != backtrace.end())
- {
- msg << "Call Stack (most recent call first):\n";
- while(i != backtrace.end())
- {
- cmListFileContext const& lfc = *i;
- msg << " " << lfc << "\n";
- ++i;
- }
- }
+ backtrace.PrintCallStack(msg);
// Add a note about warning suppression.
if(t == cmake::AUTHOR_WARNING)