Commit f68f7c25 authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

Fix reading of advanced values from CMakeCache

parent bdfa41a4
...@@ -185,6 +185,7 @@ bool cmCacheManager::LoadCache(const char* path, ...@@ -185,6 +185,7 @@ bool cmCacheManager::LoadCache(const char* path,
strcmp(entryKey.c_str() + (entryKey.size() - strlen("-ADVANCED")), strcmp(entryKey.c_str() + (entryKey.size() - strlen("-ADVANCED")),
"-ADVANCED") == 0 ) "-ADVANCED") == 0 )
{ {
std::string value = e.m_Value;
std::string akey = entryKey.substr(0, (entryKey.size() - strlen("-ADVANCED"))); std::string akey = entryKey.substr(0, (entryKey.size() - strlen("-ADVANCED")));
cmCacheManager::CacheIterator it = this->GetCacheIterator(akey.c_str()); cmCacheManager::CacheIterator it = this->GetCacheIterator(akey.c_str());
if ( it.IsAtEnd() ) if ( it.IsAtEnd() )
...@@ -192,10 +193,11 @@ bool cmCacheManager::LoadCache(const char* path, ...@@ -192,10 +193,11 @@ bool cmCacheManager::LoadCache(const char* path,
e.m_Type = cmCacheManager::UNINITIALIZED; e.m_Type = cmCacheManager::UNINITIALIZED;
m_Cache[akey] = e; m_Cache[akey] = e;
} }
else if (!it.Find(akey.c_str()))
{ {
it.SetProperty("ADVANCED", true); cmSystemTools::Error("Internal CMake error when reading cache");
} }
it.SetProperty("ADVANCED", value.c_str());
} }
else else
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment