summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-01-21 19:27:01 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-01-21 19:27:01 (GMT)
commitd72f5a0be0c5e73904ccc48473b56d214e31d4dd (patch)
treeee23f1a48e83af1f69cc143a5e6bee585ddb3921 /Source/cmCTest.cxx
parentcb95dde1e42569130d163be3f339fdeb08e63214 (diff)
downloadCMake-d72f5a0be0c5e73904ccc48473b56d214e31d4dd.zip
CMake-d72f5a0be0c5e73904ccc48473b56d214e31d4dd.tar.gz
CMake-d72f5a0be0c5e73904ccc48473b56d214e31d4dd.tar.bz2
BUG: fix leak
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 5cc0728..7be1d4c 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -3781,7 +3781,12 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
if(cmakeAndTest)
{
- return this->RunCMakeAndTest(output);
+ cmSystemTools::ResetErrorOccuredFlag();
+ cmListFileCache::GetInstance()->ClearCache();
+ int retv = this->RunCMakeAndTest(output);
+ cmSystemTools::ResetErrorOccuredFlag();
+ cmListFileCache::GetInstance()->ClearCache();
+ return retv;
}
int res;
@@ -3865,8 +3870,6 @@ void CMakeStdoutCallback(const char* m, int len, void* s)
int cmCTest::RunCMakeAndTest(std::string* outstring)
{
unsigned int k;
- cmSystemTools::ResetErrorOccuredFlag();
- cmListFileCache::GetInstance()->ClearCache();
std::string cmakeOutString;
cmSystemTools::SetErrorCallback(CMakeMessageCallback, &cmakeOutString);
cmSystemTools::SetStdoutCallback(CMakeStdoutCallback, &cmakeOutString);