Merge branch 'fix-cache-self-assignment' into release

This commit is contained in:
Brad King 2014-05-27 16:21:37 -04:00
commit 61a1612a17
2 changed files with 5 additions and 6 deletions

View File

@ -750,11 +750,7 @@ void cmCacheManager::AddCacheEntry(const char* key,
}
e.SetProperty("HELPSTRING", helpString? helpString :
"(This variable does not exist and should not be used)");
if (this->Cache[key].Value == e.Value)
{
this->CMakeInstance->UnwatchUnusedCli(key);
}
this->Cache[key] = e;
this->CMakeInstance->UnwatchUnusedCli(key);
}
bool cmCacheManager::CacheIterator::IsAtEnd() const

View File

@ -1231,7 +1231,10 @@ int cmake::HandleDeleteCacheVariables(const char* var)
if(ci.Find(save.key.c_str()))
{
save.type = ci.GetType();
save.help = ci.GetProperty("HELPSTRING");
if(const char* help = ci.GetProperty("HELPSTRING"))
{
save.help = help;
}
}
saved.push_back(save);
}