From 4d2e6c83941e8df02a96e6f45e292bca24015cb4 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 9 May 2001 11:15:57 -0400 Subject: [PATCH] FIX: only clear the cache on a load when the load needs to read internal values. Otherwise, it is assumed that we are reading another projects cache. --- Source/cmCacheManager.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 818f26047..224ca7749 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -97,8 +97,11 @@ bool cmCacheManager::LoadCache(const char* path, { std::string cacheFile = path; cacheFile += "/CMakeCache.txt"; - // clear the old cache - m_Cache.clear(); + // clear the old cache, if we are reading in internal values + if ( internal ) + { + m_Cache.clear(); + } std::ifstream fin(cacheFile.c_str()); if(!fin) {