summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-05-01 20:28:32 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-05-01 20:28:32 (GMT)
commited4f14fb4252b10db80ca8c6f04e427957ff8871 (patch)
tree378ee91b2a1c72d16e5c95fd19b2886325924cf7 /Source/cmCacheManager.cxx
parentde203f736cab8d8f9666e56520ca1e53447d8837 (diff)
downloadCMake-ed4f14fb4252b10db80ca8c6f04e427957ff8871.zip
CMake-ed4f14fb4252b10db80ca8c6f04e427957ff8871.tar.gz
CMake-ed4f14fb4252b10db80ca8c6f04e427957ff8871.tar.bz2
added method to puch cache into makefile defines
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index d3da82f..e8ec10e 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -136,6 +136,22 @@ bool cmCacheManager::LoadCache(const char* path)
return true;
}
+void cmCacheManager::DefineCache(cmMakefile *mf)
+{
+ if (!mf)
+ {
+ return;
+ }
+
+ // add definition to the makefile
+ for( std::map<std::string, CacheEntry>::const_iterator i = m_Cache.begin();
+ i != m_Cache.end(); ++i)
+ {
+ const CacheEntry& ce = (*i).second;
+ mf->AddDefinition((*i).first.c_str(), ce.m_Value.c_str());
+ }
+}
+
bool cmCacheManager::SaveCache(cmMakefile* mf) const
{
return this->SaveCache(mf->GetHomeOutputDirectory());