cmMakefile: Port away from CacheEntry.Initialized.
The API has no other external users.
This commit is contained in:
parent
1e2dbfce37
commit
9e64156725
|
@ -1810,16 +1810,17 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
|
||||||
{
|
{
|
||||||
bool haveVal = value ? true : false;
|
bool haveVal = value ? true : false;
|
||||||
std::string val = haveVal ? value : "";
|
std::string val = haveVal ? value : "";
|
||||||
cmCacheManager::CacheIterator it =
|
const char* existingValue =
|
||||||
this->GetCacheManager()->GetCacheIterator(name.c_str());
|
this->GetCacheManager()->GetInitializedCacheValue(name);
|
||||||
if(!it.IsAtEnd() && (it.GetType() == cmCacheManager::UNINITIALIZED) &&
|
if(existingValue
|
||||||
it.Initialized())
|
&& (this->GetCacheManager()->GetCacheEntryType(name)
|
||||||
|
== cmCacheManager::UNINITIALIZED))
|
||||||
{
|
{
|
||||||
// if this is not a force, then use the value from the cache
|
// if this is not a force, then use the value from the cache
|
||||||
// if it is a force, then use the value being passed in
|
// if it is a force, then use the value being passed in
|
||||||
if(!force)
|
if(!force)
|
||||||
{
|
{
|
||||||
val = it.GetValue();
|
val = existingValue;
|
||||||
haveVal = true;
|
haveVal = true;
|
||||||
}
|
}
|
||||||
if ( type == cmCacheManager::PATH || type == cmCacheManager::FILEPATH )
|
if ( type == cmCacheManager::PATH || type == cmCacheManager::FILEPATH )
|
||||||
|
@ -1842,7 +1843,7 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
|
||||||
}
|
}
|
||||||
|
|
||||||
this->GetCacheManager()->AddCacheEntry(name, nvalue.c_str(), doc, type);
|
this->GetCacheManager()->AddCacheEntry(name, nvalue.c_str(), doc, type);
|
||||||
val = it.GetValue();
|
val = this->GetCacheManager()->GetInitializedCacheValue(name);
|
||||||
haveVal = true;
|
haveVal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue