execute_process: Send stderr through cmSystemTools::Stderr
Give cmake-gui and ctest --build-and-test a chance to capture the output instead of sending it to the real stderr.
This commit is contained in:
parent
92ddf0c9e2
commit
d7c692466b
|
@ -256,10 +256,6 @@ bool cmExecuteProcessCommand
|
||||||
|
|
||||||
// Check the output variables.
|
// Check the output variables.
|
||||||
bool merge_output = (output_variable == error_variable);
|
bool merge_output = (output_variable == error_variable);
|
||||||
if(error_variable.empty() && !error_quiet)
|
|
||||||
{
|
|
||||||
cmsysProcess_SetPipeShared(cp, cmsysProcess_Pipe_STDERR, 1);
|
|
||||||
}
|
|
||||||
if(!input_file.empty())
|
if(!input_file.empty())
|
||||||
{
|
{
|
||||||
cmsysProcess_SetPipeFile(cp, cmsysProcess_Pipe_STDIN, input_file.c_str());
|
cmsysProcess_SetPipeFile(cp, cmsysProcess_Pipe_STDIN, input_file.c_str());
|
||||||
|
@ -307,7 +303,11 @@ bool cmExecuteProcessCommand
|
||||||
}
|
}
|
||||||
else if(p == cmsysProcess_Pipe_STDERR && !error_quiet)
|
else if(p == cmsysProcess_Pipe_STDERR && !error_quiet)
|
||||||
{
|
{
|
||||||
if(!error_variable.empty())
|
if(error_variable.empty())
|
||||||
|
{
|
||||||
|
cmSystemTools::Stderr(data, length);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
cmExecuteProcessCommandAppend(tempError, data, length);
|
cmExecuteProcessCommandAppend(tempError, data, length);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue