diff options
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index ac73ad0..c8cf2d4 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -18,7 +18,7 @@ #include "cmake.h" #include "cmcmd.h" -#include "cmCacheManager.h" +#include "cmState.h" #include "cmListFileCache.h" #include "cmSourceFile.h" #include "cmGlobalGenerator.h" @@ -328,25 +328,29 @@ 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.GetState()->GetCacheEntryKeys(); + for (std::vector<std::string>::const_iterator it = keys.begin(); + it != keys.end(); ++it) { - cmCacheManager::CacheEntryType t = it.GetType(); - if ( t != cmCacheManager::INTERNAL && t != cmCacheManager::STATIC && - t != cmCacheManager::UNINITIALIZED ) + cmState::CacheEntryType t = cm.GetState()->GetCacheEntryType(*it); + if (t != cmState::INTERNAL && t != cmState::STATIC && + t != cmState::UNINITIALIZED) { - bool advanced = it.PropertyExists("ADVANCED"); - if ( list_all_cached || !advanced) + const char* advancedProp = + cm.GetState()->GetCacheEntryProperty(*it, "ADVANCED"); + if ( list_all_cached || !advancedProp) { if ( list_help ) { - std::cout << "// " << it.GetProperty("HELPSTRING") << std::endl; + std::cout << "// " + << cm.GetState()->GetCacheEntryProperty(*it, + "HELPSTRING") << std::endl; } - std::cout << it.GetName() << ":" << - cmCacheManager::TypeToString(it.GetType()) - << "=" << it.GetValue() << std::endl; + std::cout << *it << ":" << + cmState::CacheEntryTypeToString(t) + << "=" << cm.GetState()->GetCacheEntryValue(*it) + << std::endl; if ( list_help ) { std::cout << std::endl; |