summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-05-07 22:11:16 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-05-07 22:11:16 (GMT)
commit885e37da224353e242e7135b0fc8e6f2445a54c7 (patch)
tree17effe2cbc6b46afcd670ffe45f0fcbb8c7d01b6 /Source/cmCacheManager.cxx
parent5066defc2378172be5bcfc22238d9cb68f05bb29 (diff)
downloadCMake-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.cxx32
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";