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  fe1b22fc00e60e37e88eacf31c369018f3eeabe9 (commit)
       via  29b0c8c3606f07f3baee245138552c3c0256ded6 (commit)
      from  f3f7acf67d013c432a610bea29d7d1b3b80a1150 (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=fe1b22fc00e60e37e88eacf31c369018f3eeabe9
commit fe1b22fc00e60e37e88eacf31c369018f3eeabe9
Merge: f3f7acf 29b0c8c
Author:     Ben Boeckel <ben.boec...@kitware.com>
AuthorDate: Fri Dec 5 12:48:40 2014 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Dec 5 12:48:40 2014 -0500

    Merge topic 'ctest-binary-pipe' into next
    
    29b0c8c3 ctest --launch: write to cout and cerr in binary


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29b0c8c3606f07f3baee245138552c3c0256ded6
commit 29b0c8c3606f07f3baee245138552c3c0256ded6
Author:     Ben Boeckel <ben.boec...@kitware.com>
AuthorDate: Fri Dec 5 12:47:18 2014 -0500
Commit:     Ben Boeckel <ben.boec...@kitware.com>
CommitDate: Fri Dec 5 12:47:18 2014 -0500

    ctest --launch: write to cout and cerr in binary
    
    Because ctest reads in binary but writes in text mode, Windows' newline
    transformation can be applied multiple times causing '\n' in the source
    application to be written out as '\r\r\n' instead.

diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index b65d23b..77c5d57 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -21,6 +21,12 @@
 #include <cmsys/RegularExpression.hxx>
 #include <cmsys/FStream.hxx>
 
+#ifdef _WIN32
+#include <io.h> // for _setmode
+#include <fcntl.h> // for _O_BINARY
+#include <stdio.h> // for std{out,err} and fileno
+#endif
+
 //----------------------------------------------------------------------------
 cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv)
 {
@@ -259,6 +265,13 @@ void cmCTestLaunch::RunChild()
               std::ios::out | std::ios::binary);
     }
 
+#ifdef _WIN32
+  // Do this so that newline transformation is not done when writing to cout
+  // and cerr below.
+  _setmode(fileno(stdout), _O_BINARY);
+  _setmode(fileno(stderr), _O_BINARY);
+#endif
+
   // Run the real command.
   cmsysProcess_Execute(cp);
 

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

Summary of changes:
 Source/CTest/cmCTestLaunch.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)


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

Reply via email to