summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-06 08:46:25 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-06 15:58:55 (GMT)
commit2e50f5e7d9269ee1e2e3587a7a4b806df48510d3 (patch)
tree8df641ee84fca77ab9e620109ce482aae157c6b2 /Source/cmMakefile.cxx
parente62243674e7ce9a162b47567ef5893fae44ed153 (diff)
downloadCMake-2e50f5e7d9269ee1e2e3587a7a4b806df48510d3.zip
CMake-2e50f5e7d9269ee1e2e3587a7a4b806df48510d3.tar.gz
CMake-2e50f5e7d9269ee1e2e3587a7a4b806df48510d3.tar.bz2
cmMakefile: Port away from CacheEntry.Initialized.
The API has no other external users.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b6eff3d..7c1b9c4 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1810,16 +1810,17 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
{
bool haveVal = value ? true : false;
std::string val = haveVal ? value : "";
- cmCacheManager::CacheIterator it =
- this->GetCacheManager()->GetCacheIterator(name.c_str());
- if(!it.IsAtEnd() && (it.GetType() == cmCacheManager::UNINITIALIZED) &&
- it.Initialized())
+ const char* existingValue =
+ this->GetCacheManager()->GetInitializedCacheValue(name);
+ if(existingValue
+ && (this->GetCacheManager()->GetCacheEntryType(name)
+ == cmCacheManager::UNINITIALIZED))
{
// 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(!force)
{
- val = it.GetValue();
+ val = existingValue;
haveVal = true;
}
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);
- val = it.GetValue();
+ val = this->GetCacheManager()->GetInitializedCacheValue(name);
haveVal = true;
}