summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-04 16:30:29 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-04 16:30:29 (GMT)
commitf68f7c2550a76cde75d422b2cda98165bfb6bff9 (patch)
tree875428c3cc7ad3931cd3b8049a8310d3e293fff3 /Source/cmCacheManager.cxx
parentbdfa41a4a6c0e87417bb5a0fc26edb2f42e08274 (diff)
downloadCMake-f68f7c2550a76cde75d422b2cda98165bfb6bff9.zip
CMake-f68f7c2550a76cde75d422b2cda98165bfb6bff9.tar.gz
CMake-f68f7c2550a76cde75d422b2cda98165bfb6bff9.tar.bz2
Fix reading of advanced values from CMakeCache
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 5549af2..7318e4a 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -185,6 +185,7 @@ bool cmCacheManager::LoadCache(const char* path,
strcmp(entryKey.c_str() + (entryKey.size() - strlen("-ADVANCED")),
"-ADVANCED") == 0 )
{
+ std::string value = e.m_Value;
std::string akey = entryKey.substr(0, (entryKey.size() - strlen("-ADVANCED")));
cmCacheManager::CacheIterator it = this->GetCacheIterator(akey.c_str());
if ( it.IsAtEnd() )
@@ -192,10 +193,11 @@ bool cmCacheManager::LoadCache(const char* path,
e.m_Type = cmCacheManager::UNINITIALIZED;
m_Cache[akey] = e;
}
- else
- {
- it.SetProperty("ADVANCED", true);
- }
+ if (!it.Find(akey.c_str()))
+ {
+ cmSystemTools::Error("Internal CMake error when reading cache");
+ }
+ it.SetProperty("ADVANCED", value.c_str());
}
else
{