ERR: Removed cmCacheManager::DefineCache method. It is no longer needed.

This commit is contained in:
Brad King 2002-01-22 10:17:37 -05:00
parent 0e0e4c1a1a
commit 8ed3ce29bf
5 changed files with 3 additions and 25 deletions

View File

@ -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<cmStdString, 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)
{
return this->SaveCache(mf->GetHomeOutputDirectory());

View File

@ -58,9 +58,6 @@ public:
std::set<std::string>& excludes,
std::set<std::string>& 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

View File

@ -73,6 +73,8 @@ bool cmLoadCacheCommand::InitialPass(std::vector<std::string> const& argsIn)
}
}
// Loop over each build directory listed in the arguments. Each
// directory has a cache file.
for(i=0; i<args.size(); i++)
{
if ((args[i] == "EXCLUDE") || (args[i] == "INCLUDE_INTERNALS"))
@ -82,7 +84,6 @@ bool cmLoadCacheCommand::InitialPass(std::vector<std::string> const& argsIn)
m_Makefile->ExpandVariablesInString(args[i]);
cmCacheManager::GetInstance()->LoadCache(args[i].c_str(), false,
excludes, includes);
cmCacheManager::GetInstance()->DefineCache(m_Makefile);
}

View File

@ -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.

View File

@ -384,9 +384,6 @@ int cmake::Generate(const std::vector<std::string>& 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()))