This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  d53b4a98b323196929d80b5bd88c114fca0fd6f3 (commit)
       via  3de4c2956539a4251b65b88bff477d5866e98510 (commit)
      from  5528d015f2ba96790ed399500f4f050a80e7d5dc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d53b4a98b323196929d80b5bd88c114fca0fd6f3
commit d53b4a98b323196929d80b5bd88c114fca0fd6f3
Merge: 5528d01 3de4c29
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Apr 17 11:27:14 2014 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Apr 17 11:27:14 2014 -0400

    Merge topic 'internal-error-backtrace' into next
    
    3de4c295 cmake: Print C++ stack trace after INTERNAL_ERROR messages


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3de4c2956539a4251b65b88bff477d5866e98510
commit 3de4c2956539a4251b65b88bff477d5866e98510
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Apr 17 11:20:13 2014 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Apr 17 11:25:19 2014 -0400

    cmake: Print C++ stack trace after INTERNAL_ERROR messages
    
    Since an INTERNAL_ERROR is always a bug, it will be useful to have the
    program stack trace available in the report.

diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 71ea3f5..7aada4b 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -24,6 +24,7 @@
 #if defined(CMAKE_BUILD_WITH_CMAKE)
 # include "cmGraphVizWriter.h"
 # include "cmVariableWatch.h"
+# include <cmsys/SystemInformation.hxx>
 #endif
 
 #include <cmsys/Glob.hxx>
@@ -2601,6 +2602,22 @@ void cmake::IssueMessage(cmake::MessageType t, 
std::string const& text,
   // Add a terminating blank line.
   msg << "\n";
 
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+  // Add a C++ stack trace to internal errors.
+  if(t == cmake::INTERNAL_ERROR)
+    {
+    std::string stack = cmsys::SystemInformation::GetProgramStack(0,0);
+    if(!stack.empty())
+      {
+      if(cmHasLiteralPrefix(stack, "WARNING:"))
+        {
+        stack = "Note:" + stack.substr(8);
+        }
+      msg << stack << "\n";
+      }
+    }
+#endif
+
   // Output the message.
   if(isError)
     {

-----------------------------------------------------------------------

Summary of changes:
 Source/cmake.cxx |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to