summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmCTest.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 30f482f..211d44b 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1568,11 +1568,11 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
if(cmakeAndTest)
{
cmSystemTools::ResetErrorOccuredFlag();
- cmListFileCache::GetInstance()->ClearCache();
+ cmListFileCache *lfc = cmListFileCache::GetInstance();
+ lfc->ClearCache();
int retv = this->RunCMakeAndTest(output);
cmSystemTools::ResetErrorOccuredFlag();
- cmListFileCache* lf = cmListFileCache::GetInstance();
- lf->ClearCache();
+ lfc->ClearCache();
#ifdef CMAKE_BUILD_WITH_CMAKE
cmDynamicLoader::FlushCache();
#endif