cmMakefile: Remove cache version accessors.
They are only used by legacy code. Inline them there to simplify cmMakefile.
This commit is contained in:
parent
cec8f97e57
commit
08c642c6ae
|
@ -51,12 +51,14 @@ void CCONV cmSetError(void *info, const char *err)
|
||||||
unsigned int CCONV cmGetCacheMajorVersion(void *arg)
|
unsigned int CCONV cmGetCacheMajorVersion(void *arg)
|
||||||
{
|
{
|
||||||
cmMakefile *mf = static_cast<cmMakefile *>(arg);
|
cmMakefile *mf = static_cast<cmMakefile *>(arg);
|
||||||
return mf->GetCacheMajorVersion();
|
cmCacheManager *manager = mf->GetCMakeInstance()->GetCacheManager();
|
||||||
|
return manager->GetCacheMajorVersion();
|
||||||
}
|
}
|
||||||
unsigned int CCONV cmGetCacheMinorVersion(void *arg)
|
unsigned int CCONV cmGetCacheMinorVersion(void *arg)
|
||||||
{
|
{
|
||||||
cmMakefile *mf = static_cast<cmMakefile *>(arg);
|
cmMakefile *mf = static_cast<cmMakefile *>(arg);
|
||||||
return mf->GetCacheMinorVersion();
|
cmCacheManager *manager = mf->GetCMakeInstance()->GetCacheManager();
|
||||||
|
return manager->GetCacheMinorVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CCONV cmGetMajorVersion(void *)
|
unsigned int CCONV cmGetMajorVersion(void *)
|
||||||
|
|
|
@ -174,16 +174,6 @@ void cmMakefile::Initialize()
|
||||||
this->CheckCMP0000 = false;
|
this->CheckCMP0000 = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int cmMakefile::GetCacheMajorVersion() const
|
|
||||||
{
|
|
||||||
return this->GetCacheManager()->GetCacheMajorVersion();
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int cmMakefile::GetCacheMinorVersion() const
|
|
||||||
{
|
|
||||||
return this->GetCacheManager()->GetCacheMinorVersion();
|
|
||||||
}
|
|
||||||
|
|
||||||
cmMakefile::~cmMakefile()
|
cmMakefile::~cmMakefile()
|
||||||
{
|
{
|
||||||
cmDeleteAll(this->InstallGenerators);
|
cmDeleteAll(this->InstallGenerators);
|
||||||
|
|
|
@ -62,14 +62,6 @@ class cmMakefile
|
||||||
class Internals;
|
class Internals;
|
||||||
cmsys::auto_ptr<Internals> Internal;
|
cmsys::auto_ptr<Internals> Internal;
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
* Return the major and minor version of the cmake that
|
|
||||||
* was used to write the currently loaded cache, note
|
|
||||||
* this method will not work before the cache is loaded.
|
|
||||||
*/
|
|
||||||
unsigned int GetCacheMajorVersion() const;
|
|
||||||
unsigned int GetCacheMinorVersion() const;
|
|
||||||
|
|
||||||
/* Check for unused variables in this scope */
|
/* Check for unused variables in this scope */
|
||||||
void CheckForUnusedVariables() const;
|
void CheckForUnusedVariables() const;
|
||||||
/* Mark a variable as used */
|
/* Mark a variable as used */
|
||||||
|
|
|
@ -52,11 +52,13 @@ bool cmUtilitySourceCommand
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cmCacheManager *manager =
|
||||||
|
this->Makefile->GetCMakeInstance()->GetCacheManager();
|
||||||
haveCacheValue = (cacheValue &&
|
haveCacheValue = (cacheValue &&
|
||||||
(strstr(cacheValue, "(IntDir)") == 0 ||
|
(strstr(cacheValue, "(IntDir)") == 0 ||
|
||||||
(intDir && strcmp(intDir, "$(IntDir)") == 0)) &&
|
(intDir && strcmp(intDir, "$(IntDir)") == 0)) &&
|
||||||
(this->Makefile->GetCacheMajorVersion() != 0 &&
|
(manager->GetCacheMajorVersion() != 0 &&
|
||||||
this->Makefile->GetCacheMinorVersion() != 0 ));
|
manager->GetCacheMinorVersion() != 0 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(haveCacheValue)
|
if(haveCacheValue)
|
||||||
|
|
Loading…
Reference in New Issue