Merge topic 'fix-cache-self-assignment'
1cd37527 cmCacheManager: Avoid cache entry self-assignment 326d15a3 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 :
|
e.SetProperty("HELPSTRING", helpString? helpString :
|
||||||
"(This variable does not exist and should not be used)");
|
"(This variable does not exist and should not be used)");
|
||||||
if (this->Cache[key].Value == e.Value)
|
this->CMakeInstance->UnwatchUnusedCli(key);
|
||||||
{
|
|
||||||
this->CMakeInstance->UnwatchUnusedCli(key);
|
|
||||||
}
|
|
||||||
this->Cache[key] = e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmCacheManager::CacheIterator::IsAtEnd() const
|
bool cmCacheManager::CacheIterator::IsAtEnd() const
|
||||||
|
@ -1236,7 +1236,10 @@ int cmake::HandleDeleteCacheVariables(const std::string& var)
|
|||||||
if(ci.Find(save.key))
|
if(ci.Find(save.key))
|
||||||
{
|
{
|
||||||
save.type = ci.GetType();
|
save.type = ci.GetType();
|
||||||
save.help = ci.GetProperty("HELPSTRING");
|
if(const char* help = ci.GetProperty("HELPSTRING"))
|
||||||
|
{
|
||||||
|
save.help = help;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
saved.push_back(save);
|
saved.push_back(save);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user