summaryrefslogtreecommitdiffstats
path: root/Source/cmGetPropertyCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-07 21:14:41 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-07 21:15:04 (GMT)
commit3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94 (patch)
treed0372265c5b1f07f9b1a8a6cc9bedf96bed2dbcb /Source/cmGetPropertyCommand.cxx
parent9410e24a4ad3a21b2c27d057798f723e88d14d45 (diff)
downloadCMake-3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94.zip
CMake-3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94.tar.gz
CMake-3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94.tar.bz2
Revert topic 'refactor-cache-api'
This topic was never tested without some follow-up commits. The GetCacheEntryValue API returns a pointer to memory freed on return. It will have to be revised along with the rest of the original topic.
Diffstat (limited to 'Source/cmGetPropertyCommand.cxx')
-rw-r--r--Source/cmGetPropertyCommand.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 0e6e0c2..f0b2686 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -391,10 +391,11 @@ bool cmGetPropertyCommand::HandleCacheMode()
}
const char* value = 0;
- if(this->Makefile->GetCacheManager()->GetCacheEntryValue(this->Name))
+ cmCacheManager::CacheIterator it =
+ this->Makefile->GetCacheManager()->GetCacheIterator(this->Name.c_str());
+ if(!it.IsAtEnd())
{
- value = this->Makefile->GetCacheManager()
- ->GetCacheEntryProperty(this->Name, this->PropertyName);
+ value = it.GetProperty(this->PropertyName);
}
this->StoreResult(value);
return true;