summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-05 08:48:04 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-06 15:58:55 (GMT)
commit9410e24a4ad3a21b2c27d057798f723e88d14d45 (patch)
tree9259e248faee43f15b544e1fa7ee61f3ce23e0c4 /Source/cmakemain.cxx
parent7b7ae3b1a1d1c664eeef48392759883aa4040657 (diff)
downloadCMake-9410e24a4ad3a21b2c27d057798f723e88d14d45.zip
CMake-9410e24a4ad3a21b2c27d057798f723e88d14d45.tar.gz
CMake-9410e24a4ad3a21b2c27d057798f723e88d14d45.tar.bz2
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/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx26
1 files changed, 16 insertions, 10 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index ac73ad0..3b518be 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -328,25 +328,31 @@ int do_cmake(int ac, char const* const* av)
int res = cm.Run(args, view_only);
if ( list_cached || list_all_cached )
{
- cmCacheManager::CacheIterator it =
- cm.GetCacheManager()->GetCacheIterator();
std::cout << "-- Cache values" << std::endl;
- for ( it.Begin(); !it.IsAtEnd(); it.Next() )
+ std::vector<std::string> keys =
+ cm.GetCacheManager()->GetCacheEntryKeys();
+ for (std::vector<std::string>::const_iterator it = keys.begin();
+ it != keys.end(); ++it)
{
- cmCacheManager::CacheEntryType t = it.GetType();
+ cmCacheManager::CacheEntryType t =
+ cm.GetCacheManager()->GetCacheEntryType(*it);
if ( t != cmCacheManager::INTERNAL && t != cmCacheManager::STATIC &&
t != cmCacheManager::UNINITIALIZED )
{
- bool advanced = it.PropertyExists("ADVANCED");
- if ( list_all_cached || !advanced)
+ const char* advancedProp =
+ cm.GetCacheManager()->GetCacheEntryProperty(*it, "ADVANCED");
+ if ( list_all_cached || !advancedProp)
{
if ( list_help )
{
- std::cout << "// " << it.GetProperty("HELPSTRING") << std::endl;
+ std::cout << "// "
+ << cm.GetCacheManager()->GetCacheEntryProperty(*it,
+ "HELPSTRING") << std::endl;
}
- std::cout << it.GetName() << ":" <<
- cmCacheManager::TypeToString(it.GetType())
- << "=" << it.GetValue() << std::endl;
+ std::cout << *it << ":" <<
+ cmCacheManager::TypeToString(t)
+ << "=" << cm.GetCacheManager()->GetCacheEntryValue(*it)
+ << std::endl;
if ( list_help )
{
std::cout << std::endl;