summaryrefslogtreecommitdiff
path: root/Source/cmSetCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-05 10:48:04 +0200
committerStephen Kelly <steveire@gmail.com>2015-04-08 18:47:00 +0200
commitba404938a202b51bb82bff8692ed08e53b061ad4 (patch)
tree445c969ae57dc9656e791af23b0b9f6830c6d255 /Source/cmSetCommand.cxx
parentf3922a9a5b463420db5f7fae08efdf1b4abdfe5e (diff)
downloadcmake-ba404938a202b51bb82bff8692ed08e53b061ad4.tar.gz
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.
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r--Source/cmSetCommand.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index 204d95b1e8..e17474bd60 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -136,9 +136,10 @@ bool cmSetCommand
}
// see if this is already in the cache
- cmCacheManager::CacheIterator it =
- this->Makefile->GetCacheManager()->GetCacheIterator(variable);
- if(!it.IsAtEnd() && (it.GetType() != cmCacheManager::UNINITIALIZED))
+ cmCacheManager* manager = this->Makefile->GetCacheManager();
+ const char* existingValue = manager->GetCacheEntryValue(variable);
+ if(existingValue &&
+ (manager->GetCacheEntryType(variable) != cmCacheManager::UNINITIALIZED))
{
// if the set is trying to CACHE the value but the value
// is already in the cache and the type is not internal