1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-18 00:02:21 +08:00

cmCacheManager: Port consumers to non-iterator API.

This simplifies reasoning about the follow-up commit which ports
away from cmCacheManager to a class with the same method names.
This commit is contained in:
Stephen Kelly
2015-04-05 10:48:04 +02:00
parent f3922a9a5b
commit ba404938a2
13 changed files with 117 additions and 115 deletions

View File

@@ -366,18 +366,18 @@ bool cmFindBase::CheckForVariableInCache()
if(const char* cacheValue =
this->Makefile->GetDefinition(this->VariableName))
{
cmCacheManager::CacheIterator it =
this->Makefile->GetCacheManager()->
GetCacheIterator(this->VariableName.c_str());
cmCacheManager* manager = this->Makefile->GetCacheManager();
const char* cacheEntry = manager->GetCacheEntryValue(this->VariableName);
bool found = !cmSystemTools::IsNOTFOUND(cacheValue);
bool cached = !it.IsAtEnd();
bool cached = cacheEntry ? true : false;
if(found)
{
// If the user specifies the entry on the command line without a
// type we should add the type and docstring but keep the
// original value. Tell the subclass implementations to do
// this.
if(cached && it.GetType() == cmCacheManager::UNINITIALIZED)
if(cached && manager->GetCacheEntryType(this->VariableName)
== cmCacheManager::UNINITIALIZED)
{
this->AlreadyInCacheWithoutMetaInfo = true;
}
@@ -385,7 +385,8 @@ bool cmFindBase::CheckForVariableInCache()
}
else if(cached)
{
const char* hs = it.GetProperty("HELPSTRING");
const char* hs = manager->GetCacheEntryProperty(this->VariableName,
"HELPSTRING");
this->VariableDocumentation = hs?hs:"(none)";
}
}