diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-06 11:32:00 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-06 15:58:54 (GMT) |
commit | 08c642c6ae47fd075fe1060fc0e28d8a24cc3c00 (patch) | |
tree | c4887cdd0e1991d8833923ddfdad7dd7986dbfd8 /Source | |
parent | cec8f97e5717fac279d310f3f0b9e849a0e59706 (diff) | |
download | CMake-08c642c6ae47fd075fe1060fc0e28d8a24cc3c00.zip CMake-08c642c6ae47fd075fe1060fc0e28d8a24cc3c00.tar.gz CMake-08c642c6ae47fd075fe1060fc0e28d8a24cc3c00.tar.bz2 |
cmMakefile: Remove cache version accessors.
They are only used by legacy code. Inline them there to simplify
cmMakefile.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCPluginAPI.cxx | 6 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 10 | ||||
-rw-r--r-- | Source/cmMakefile.h | 8 | ||||
-rw-r--r-- | Source/cmUtilitySourceCommand.cxx | 6 |
4 files changed, 8 insertions, 22 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 691d80d..987a7b1 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -51,12 +51,14 @@ void CCONV cmSetError(void *info, const char *err) unsigned int CCONV cmGetCacheMajorVersion(void *arg) { cmMakefile *mf = static_cast<cmMakefile *>(arg); - return mf->GetCacheMajorVersion(); + cmCacheManager *manager = mf->GetCMakeInstance()->GetCacheManager(); + return manager->GetCacheMajorVersion(); } unsigned int CCONV cmGetCacheMinorVersion(void *arg) { cmMakefile *mf = static_cast<cmMakefile *>(arg); - return mf->GetCacheMinorVersion(); + cmCacheManager *manager = mf->GetCMakeInstance()->GetCacheManager(); + return manager->GetCacheMinorVersion(); } unsigned int CCONV cmGetMajorVersion(void *) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 7f44da2..ad4ad7c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -174,16 +174,6 @@ void cmMakefile::Initialize() this->CheckCMP0000 = false; } -unsigned int cmMakefile::GetCacheMajorVersion() const -{ - return this->GetCacheManager()->GetCacheMajorVersion(); -} - -unsigned int cmMakefile::GetCacheMinorVersion() const -{ - return this->GetCacheManager()->GetCacheMinorVersion(); -} - cmMakefile::~cmMakefile() { cmDeleteAll(this->InstallGenerators); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 920b6b7..5209891 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -62,14 +62,6 @@ class cmMakefile class Internals; cmsys::auto_ptr<Internals> Internal; 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 */ void CheckForUnusedVariables() const; /* Mark a variable as used */ diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index ee1ff29..2799a9b 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -52,11 +52,13 @@ bool cmUtilitySourceCommand } else { + cmCacheManager *manager = + this->Makefile->GetCMakeInstance()->GetCacheManager(); haveCacheValue = (cacheValue && (strstr(cacheValue, "(IntDir)") == 0 || (intDir && strcmp(intDir, "$(IntDir)") == 0)) && - (this->Makefile->GetCacheMajorVersion() != 0 && - this->Makefile->GetCacheMinorVersion() != 0 )); + (manager->GetCacheMajorVersion() != 0 && + manager->GetCacheMinorVersion() != 0 )); } if(haveCacheValue) |