[Cmake-commits] CMake branch, next, updated. v3.2.2-2609-g397cd9f

Brad King brad.king at kitware.com
Thu May 7 15:07:07 EDT 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  397cd9f9e643b01f271b796403d39443422b6a1a (commit)
       via  31c218e6e12affd482b9ce2880bd9385c77d9025 (commit)
       via  ac94a796f1f0c5acc06d67d5ad283b29476c1d2e (commit)
      from  7d490498bc8156ea5fc66078642268491d44281e (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=397cd9f9e643b01f271b796403d39443422b6a1a
commit 397cd9f9e643b01f271b796403d39443422b6a1a
Merge: 7d49049 31c218e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 7 15:07:04 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 7 15:07:04 2015 -0400

    Merge topic 'update-kwsys' into next
    
    31c218e6 Merge branch 'upstream-kwsys' into update-kwsys
    ac94a796 KWSys 2015-05-05 (34fceb50)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31c218e6e12affd482b9ce2880bd9385c77d9025
commit 31c218e6e12affd482b9ce2880bd9385c77d9025
Merge: ee1ddec ac94a79
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 7 14:34:50 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 7 14:34:50 2015 -0400

    Merge branch 'upstream-kwsys' into update-kwsys


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac94a796f1f0c5acc06d67d5ad283b29476c1d2e
commit ac94a796f1f0c5acc06d67d5ad283b29476c1d2e
Author:     KWSys Robot <kwrobot at kitware.com>
AuthorDate: Tue May 5 09:05:38 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 7 14:34:47 2015 -0400

    KWSys 2015-05-05 (34fceb50)
    
    Extract upstream KWSys using the following shell commands.
    
    $ git archive --prefix=upstream-kwsys/ 34fceb50 | tar x
    $ git shortlog --no-merges --abbrev=8 --format='%h %s' 8c8b2273..34fceb50
    Brad King (1):
          34fceb50 Process: Add option to merge stdout/stderr

diff --git a/Process.h.in b/Process.h.in
index c5995ea..e35939f 100644
--- a/Process.h.in
+++ b/Process.h.in
@@ -36,6 +36,7 @@
 # define kwsysProcess_SetPipeShared       kwsys_ns(Process_SetPipeShared)
 # define kwsysProcess_Option_Detach       kwsys_ns(Process_Option_Detach)
 # define kwsysProcess_Option_HideWindow   kwsys_ns(Process_Option_HideWindow)
+# define kwsysProcess_Option_MergeOutput  kwsys_ns(Process_Option_MergeOutput)
 # define kwsysProcess_Option_Verbatim     kwsys_ns(Process_Option_Verbatim)
 # define kwsysProcess_GetOption           kwsys_ns(Process_GetOption)
 # define kwsysProcess_SetOption           kwsys_ns(Process_SetOption)
@@ -186,6 +187,12 @@ kwsysEXPORT void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe,
  *         0 = No (default)
  *         1 = Yes
  *
+ *  kwsysProcess_Option_MergeOutput = Whether to merge stdout/stderr.
+ *                                    No content will be returned as stderr.
+ *                                    Any actual stderr will be on stdout.
+ *         0 = No (default)
+ *         1 = Yes
+ *
  *  kwsysProcess_Option_Verbatim = Whether SetCommand and AddCommand
  *                                 should treat the first argument
  *                                 as a verbatim command line
@@ -200,6 +207,7 @@ enum kwsysProcess_Option_e
 {
   kwsysProcess_Option_HideWindow,
   kwsysProcess_Option_Detach,
+  kwsysProcess_Option_MergeOutput,
   kwsysProcess_Option_Verbatim
 };
 
@@ -384,6 +392,7 @@ kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp);
 #  undef kwsysProcess_SetPipeShared
 #  undef kwsysProcess_Option_Detach
 #  undef kwsysProcess_Option_HideWindow
+#  undef kwsysProcess_Option_MergeOutput
 #  undef kwsysProcess_Option_Verbatim
 #  undef kwsysProcess_GetOption
 #  undef kwsysProcess_SetOption
diff --git a/ProcessUNIX.c b/ProcessUNIX.c
index 68722c2..0393a6d 100644
--- a/ProcessUNIX.c
+++ b/ProcessUNIX.c
@@ -234,6 +234,9 @@ struct kwsysProcess_s
   /* Whether to treat command lines as verbatim.  */
   int Verbatim;
 
+  /* Whether to merge stdout/stderr of the child.  */
+  int MergeOutput;
+
   /* Time at which the child started.  Negative for no timeout.  */
   kwsysProcessTime StartTime;
 
@@ -644,6 +647,7 @@ int kwsysProcess_GetOption(kwsysProcess* cp, int optionId)
   switch(optionId)
     {
     case kwsysProcess_Option_Detach: return cp->OptionDetach;
+    case kwsysProcess_Option_MergeOutput: return cp->MergeOutput;
     case kwsysProcess_Option_Verbatim: return cp->Verbatim;
     default: return 0;
     }
@@ -660,6 +664,7 @@ void kwsysProcess_SetOption(kwsysProcess* cp, int optionId, int value)
   switch(optionId)
     {
     case kwsysProcess_Option_Detach: cp->OptionDetach = value; break;
+    case kwsysProcess_Option_MergeOutput: cp->MergeOutput = value; break;
     case kwsysProcess_Option_Verbatim: cp->Verbatim = value; break;
     default: break;
     }
@@ -997,7 +1002,7 @@ void kwsysProcess_Execute(kwsysProcess* cp)
       nextStdIn = p[0];
       si.StdOut = p[1];
       }
-    si.StdErr = cp->PipeChildStd[2];
+    si.StdErr = cp->MergeOutput? cp->PipeChildStd[1] : cp->PipeChildStd[2];
 
     {
     int res = kwsysProcessCreate(cp, i, &si);
@@ -1011,7 +1016,7 @@ void kwsysProcess_Execute(kwsysProcess* cp)
       {
       kwsysProcessCleanupDescriptor(&si.StdOut);
       }
-    if (si.StdErr != cp->PipeChildStd[2])
+    if (si.StdErr != cp->PipeChildStd[2] && !cp->MergeOutput)
       {
       kwsysProcessCleanupDescriptor(&si.StdErr);
       }
diff --git a/ProcessWin32.c b/ProcessWin32.c
index da1bc15..f630171 100644
--- a/ProcessWin32.c
+++ b/ProcessWin32.c
@@ -226,6 +226,9 @@ struct kwsysProcess_s
   /* Whether to treat command lines as verbatim.  */
   int Verbatim;
 
+  /* Whether to merge stdout/stderr of the child.  */
+  int MergeOutput;
+
   /* Mutex to protect the shared index used by threads to report data.  */
   HANDLE SharedIndexMutex;
 
@@ -806,6 +809,7 @@ int kwsysProcess_GetOption(kwsysProcess* cp, int optionId)
     {
     case kwsysProcess_Option_Detach: return cp->OptionDetach;
     case kwsysProcess_Option_HideWindow: return cp->HideWindow;
+    case kwsysProcess_Option_MergeOutput: return cp->MergeOutput;
     case kwsysProcess_Option_Verbatim: return cp->Verbatim;
     default: return 0;
     }
@@ -823,6 +827,7 @@ void kwsysProcess_SetOption(kwsysProcess* cp, int optionId, int value)
     {
     case kwsysProcess_Option_Detach: cp->OptionDetach = value; break;
     case kwsysProcess_Option_HideWindow: cp->HideWindow = value; break;
+    case kwsysProcess_Option_MergeOutput: cp->MergeOutput = value; break;
     case kwsysProcess_Option_Verbatim: cp->Verbatim = value; break;
     default: break;
     }
@@ -1086,7 +1091,7 @@ void kwsysProcess_Execute(kwsysProcess* cp)
       nextStdInput = p[0];
       si.hStdOutput = p[1];
       }
-    si.hStdError = cp->PipeChildStd[2];
+    si.hStdError = cp->MergeOutput? cp->PipeChildStd[1] : cp->PipeChildStd[2];
 
     {
     int res = kwsysProcessCreate(cp, i, &si);
@@ -1100,7 +1105,7 @@ void kwsysProcess_Execute(kwsysProcess* cp)
       {
       kwsysProcessCleanupHandle(&si.hStdOutput);
       }
-    if (si.hStdError != cp->PipeChildStd[2])
+    if (si.hStdError != cp->PipeChildStd[2] && !cp->MergeOutput)
       {
       kwsysProcessCleanupHandle(&si.hStdError);
       }

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

Summary of changes:
 Source/kwsys/Process.h.in   |    9 +++++++++
 Source/kwsys/ProcessUNIX.c  |    9 +++++++--
 Source/kwsys/ProcessWin32.c |    9 +++++++--
 3 files changed, 23 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list