mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 14:40:26 -06:00
Merge topic 'fix-cache-self-assignment'
1cd37527cmCacheManager: Avoid cache entry self-assignment326d15a3cmake: Tolerate missing HELPSTRING on compiler change
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user