[Cmake-commits] CMake branch, next, updated. v3.1.2-1112-g57d15db

Brad King brad.king at kitware.com
Fri Feb 6 16:44:37 EST 2015


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  57d15db5af7074d421ee5f86eafcf852c93e2d6a (commit)
       via  c6ada8275b680e02f50a7aee1c02b0b184cadf83 (commit)
      from  ac06e3ebdab8cdec3195464774bf91f9404929a4 (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=57d15db5af7074d421ee5f86eafcf852c93e2d6a
commit 57d15db5af7074d421ee5f86eafcf852c93e2d6a
Merge: ac06e3e c6ada82
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 6 16:44:37 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 6 16:44:37 2015 -0500

    Merge topic 'fix-make-parallel-output' into next
    
    c6ada827 Makefile: Print all color escape sequences before newline


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6ada8275b680e02f50a7aee1c02b0b184cadf83
commit c6ada8275b680e02f50a7aee1c02b0b184cadf83
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 6 16:39:00 2015 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 6 16:41:51 2015 -0500

    Makefile: Print all color escape sequences before newline
    
    Ensure that the escape sequences do not leak across lines.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index ec3d846..f50d16c 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2304,13 +2304,19 @@ void cmSystemTools::MakefileColorEcho(int color, const char* message,
 
   if(enabled)
     {
-    cmsysTerminal_cfprintf(color | assumeTTY, stdout, "%s%s",
-                           message, newline? "\n" : "");
+    // Print with color.  Delay the newline until later so that
+    // all color restore sequences appear before it.
+    cmsysTerminal_cfprintf(color | assumeTTY, stdout, "%s", message);
     }
   else
     {
     // Color is disabled.  Print without color.
-    fprintf(stdout, "%s%s", message, newline? "\n" : "");
+    fprintf(stdout, "%s", message);
+    }
+
+  if(newline)
+    {
+    fprintf(stdout, "\n");
     }
 }
 

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

Summary of changes:
 Source/cmSystemTools.cxx |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list