diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-07 22:11:16 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-07 22:11:16 (GMT) |
commit | 885e37da224353e242e7135b0fc8e6f2445a54c7 (patch) | |
tree | 17effe2cbc6b46afcd670ffe45f0fcbb8c7d01b6 /Source/cmCacheManager.cxx | |
parent | 5066defc2378172be5bcfc22238d9cb68f05bb29 (diff) | |
download | CMake-885e37da224353e242e7135b0fc8e6f2445a54c7.zip CMake-885e37da224353e242e7135b0fc8e6f2445a54c7.tar.gz CMake-885e37da224353e242e7135b0fc8e6f2445a54c7.tar.bz2 |
ENH: call configure from cmake
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r-- | Source/cmCacheManager.cxx | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index cdffb56..7582f37 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -185,13 +185,30 @@ bool cmCacheManager::SaveCache(const char* path) const for( std::map<std::string, CacheEntry>::const_iterator i = m_Cache.begin(); i != m_Cache.end(); ++i) { + const CacheEntry& ce = (*i).second; + CacheEntryType t = ce.m_Type; + if(t != INTERNAL) + { + // Format is key:type=value + cmCacheManager::OutputHelpString(fout, ce.m_HelpString); + fout << (*i).first.c_str() << ":" + << cmCacheManagerTypes[t] << "=" + << ce.m_Value << "\n"; + } + } + for( std::map<std::string, CacheEntry>::const_iterator i = m_Cache.begin(); + i != m_Cache.end(); ++i) + { const CacheEntry& ce = (*i).second; CacheEntryType t = ce.m_Type; - // Format is key:type=value - cmCacheManager::OutputHelpString(fout, ce.m_HelpString); - fout << (*i).first.c_str() << ":" - << cmCacheManagerTypes[t] << "=" - << ce.m_Value << "\n"; + if(t == INTERNAL) + { + // Format is key:type=value + cmCacheManager::OutputHelpString(fout, ce.m_HelpString); + fout << (*i).first.c_str() << ":" + << cmCacheManagerTypes[t] << "=" + << ce.m_Value << "\n"; + } } fout << "\n"; fout.close(); @@ -279,7 +296,10 @@ void cmCacheManager::PrintCache(std::ostream& out) const for(std::map<std::string, CacheEntry>::const_iterator i = m_Cache.begin(); i != m_Cache.end(); ++i) { - out << (*i).first.c_str() << " = " << (*i).second.m_Value.c_str() << std::endl; + if((*i).second.m_Type != INTERNAL) + { + out << (*i).first.c_str() << " = " << (*i).second.m_Value.c_str() << std::endl; + } } out << "\n\n"; out << "To change values in the CMakeCache, \nedit CMakeCache.txt in your output directory.\n"; |