added method to puch cache into makefile defines
This commit is contained in:
parent
de203f736c
commit
ed4f14fb42
|
@ -136,6 +136,22 @@ bool cmCacheManager::LoadCache(const char* path)
|
||||||
return true;
|
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
|
bool cmCacheManager::SaveCache(cmMakefile* mf) const
|
||||||
{
|
{
|
||||||
return this->SaveCache(mf->GetHomeOutputDirectory());
|
return this->SaveCache(mf->GetHomeOutputDirectory());
|
||||||
|
|
|
@ -79,6 +79,9 @@ public:
|
||||||
//! Load a cache for given makefile. Loads from path/CMakeCache.txt.
|
//! Load a cache for given makefile. Loads from path/CMakeCache.txt.
|
||||||
bool LoadCache(const char* path);
|
bool LoadCache(const char* path);
|
||||||
|
|
||||||
|
//! Put cache definitions into makefile
|
||||||
|
void DefineCache(cmMakefile*);
|
||||||
|
|
||||||
//! Save cache for given makefile. Saves to ouput home CMakeCache.txt.
|
//! Save cache for given makefile. Saves to ouput home CMakeCache.txt.
|
||||||
bool SaveCache(cmMakefile*) const;
|
bool SaveCache(cmMakefile*) const;
|
||||||
//! Save cache for given makefile. Saves to ouput path/CMakeCache.txt
|
//! Save cache for given makefile. Saves to ouput path/CMakeCache.txt
|
||||||
|
|
Loading…
Reference in New Issue