Merge topic 'fix-cache-self-assignment'
1cd37527
cmCacheManager: Avoid cache entry self-assignment326d15a3
cmake: Tolerate missing HELPSTRING on compiler change
This commit is contained in:
commit
af34639724
|
@ -751,11 +751,7 @@ void cmCacheManager::AddCacheEntry(const std::string& 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
|
||||
|
|
|
@ -1236,7 +1236,10 @@ int cmake::HandleDeleteCacheVariables(const std::string& var)
|
|||
if(ci.Find(save.key))
|
||||
{
|
||||
save.type = ci.GetType();
|
||||
save.help = ci.GetProperty("HELPSTRING");
|
||||
if(const char* help = ci.GetProperty("HELPSTRING"))
|
||||
{
|
||||
save.help = help;
|
||||
}
|
||||
}
|
||||
saved.push_back(save);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue