summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-08-17 21:39:59 (GMT)
committerBrad King <brad.king@kitware.com>2005-08-17 21:39:59 (GMT)
commit1c96fa4a4122665fa5b4db26a84bbf5425d7b0dd (patch)
tree66d7f27acf148daec936fdadad407c9293a75637 /Source/cmSystemTools.cxx
parent93efb1cf5b1c0caaf9cc8acb74f4e7bc7fada3d3 (diff)
downloadCMake-1c96fa4a4122665fa5b4db26a84bbf5425d7b0dd.zip
CMake-1c96fa4a4122665fa5b4db26a84bbf5425d7b0dd.tar.gz
CMake-1c96fa4a4122665fa5b4db26a84bbf5425d7b0dd.tar.bz2
BUG: RunSingleCommand should translate NULL characters in the output to valid text. This should fix the missing-output problem caused by NULL-characters in VS build output.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 0cde6c8..0621ba2 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -482,6 +482,19 @@ bool cmSystemTools::RunSingleCommand(
{
while(cmsysProcess_WaitForData(cp, &data, &length, 0))
{
+ if(output || verbose)
+ {
+ // Translate NULL characters in the output into valid text.
+ // Visual Studio 7 puts these characters in the output of its
+ // build process.
+ for(int i=0; i < length; ++i)
+ {
+ if(data[i] == '\0')
+ {
+ data[i] = ' ';
+ }
+ }
+ }
if ( output )
{
tempOutput.insert(tempOutput.end(), data, data+length);