Commit 8ed3ce29 authored by Brad King's avatar Brad King
Browse files

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

parent 0e0e4c1a
......@@ -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());
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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.
......
......@@ -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()))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment