From 1cdd8b4fbd39abfa162b36d6f49643a4dceef1fd Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Tue, 21 Mar 2006 16:01:50 -0500 Subject: BUG: Handle visual studio 8 --- Source/cmCTest.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index ee40dff..4e941af 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -257,7 +257,8 @@ cmCTest::cmCTest() this->TestingHandlers["submit"] = new cmCTestSubmitHandler; cmCTest::t_TestingHandlers::iterator it; - for ( it = this->TestingHandlers.begin(); it != this->TestingHandlers.end(); ++ it ) + for ( it = this->TestingHandlers.begin(); + it != this->TestingHandlers.end(); ++ it ) { it->second->SetCTestInstance(this); } @@ -270,7 +271,8 @@ cmCTest::cmCTest() cmCTest::~cmCTest() { cmCTest::t_TestingHandlers::iterator it; - for ( it = this->TestingHandlers.begin(); it != this->TestingHandlers.end(); ++ it ) + for ( it = this->TestingHandlers.begin(); + it != this->TestingHandlers.end(); ++ it ) { delete it->second; it->second = 0; @@ -2168,8 +2170,14 @@ bool cmCTest::RunCommand( } cmsysProcess_WaitForExit(cp, 0); - stdOut->append(&*tempOutput.begin(), tempOutput.size()); - stdErr->append(&*tempError.begin(), tempError.size()); + if ( tempOutput.size() > 0 ) + { + stdOut->append(&*tempOutput.begin(), tempOutput.size()); + } + if ( tempError.size() > 0 ) + { + stdErr->append(&*tempError.begin(), tempError.size()); + } bool result = true; if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) -- cgit v0.12