From 8ed3ce29bf3b185ecc0f8b5132cac497f4150e0b Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 22 Jan 2002 10:17:37 -0500 Subject: ERR: Removed cmCacheManager::DefineCache method. It is no longer needed. --- Source/cmCacheManager.cxx | 16 ---------------- Source/cmCacheManager.h | 3 --- Source/cmLoadCacheCommand.cxx | 3 ++- Source/cmMakefile.cxx | 3 +-- Source/cmake.cxx | 3 --- 5 files changed, 3 insertions(+), 25 deletions(-) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 3ab8904..ba4f76f 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -256,22 +256,6 @@ bool cmCacheManager::LoadCache(const char* path, return true; } -void cmCacheManager::DefineCache(cmMakefile *mf) -{ - if (!mf) - { - return; - } - - // add definition to the makefile - for( std::map::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) { return this->SaveCache(mf->GetHomeOutputDirectory()); diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index d557b66..54a1d10 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -58,9 +58,6 @@ public: std::set& excludes, std::set& includes); - ///! Put cache definitions into makefile - void DefineCache(cmMakefile*); - ///! Save cache for given makefile. Saves to ouput home CMakeCache.txt. bool SaveCache(cmMakefile*) ; ///! Save cache for given makefile. Saves to ouput path/CMakeCache.txt diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index 2076435..9ea56e6 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -73,6 +73,8 @@ bool cmLoadCacheCommand::InitialPass(std::vector const& argsIn) } } + // Loop over each build directory listed in the arguments. Each + // directory has a cache file. for(i=0; i const& argsIn) m_Makefile->ExpandVariablesInString(args[i]); cmCacheManager::GetInstance()->LoadCache(args[i].c_str(), false, excludes, includes); - cmCacheManager::GetInstance()->DefineCache(m_Makefile); } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 506130a..deead3e 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -52,7 +52,6 @@ cmMakefile::cmMakefile() this->AddSourceGroup("Header Files", "\\.(h|hh|hpp|hxx|hm|inl)$"); this->AddDefaultCommands(); this->AddDefaultDefinitions(); - cmCacheManager::GetInstance()->DefineCache(this); } unsigned int cmMakefile::GetCacheMajorVersion() @@ -885,7 +884,7 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source, bool atOnly) const { // This method replaces ${VAR} and @VAR@ where VAR is looked up - // in the m_Definitions map, if not found in the map, nothing is expanded. + // with GetDefinition(), if not found in the map, nothing is expanded. // It also supports the $ENV{VAR} syntax where VAR is looked up in // the current environment variables. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index c65ca8a..6c845cb 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -384,9 +384,6 @@ int cmake::Generate(const std::vector& args, bool buildMakefiles) // compute system info gen->ComputeSystemInfo(); - // Transfer the cache into the makefile's definitions. - cmCacheManager::GetInstance()->DefineCache(&mf); - std::string lf = mf.GetStartDirectory(); lf += "/CMakeLists.txt"; if(!mf.ReadListFile(lf.c_str())) -- cgit v0.12