From 83f39ba41b2c8969db2b44761d5fed363dc170b5 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Thu, 5 Mar 2009 13:57:10 -0500
Subject: [PATCH] STYLE: Remove unused cmake::CacheVersionMatches

This remove the method completely since nothing uses it.
---
 Source/cmake.cxx | 20 --------------------
 Source/cmake.h   |  2 --
 2 files changed, 22 deletions(-)

diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 40707556e3..da690732fa 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2174,26 +2174,6 @@ int cmake::ActualConfigure()
   return 0;
 }
 
-bool cmake::CacheVersionMatches()
-{
-  const char* majv = 
-    this->CacheManager->GetCacheValue("CMAKE_CACHE_MAJOR_VERSION");
-  const char* minv = 
-    this->CacheManager->GetCacheValue("CMAKE_CACHE_MINOR_VERSION");
-  const char* relv = 
-    this->CacheManager->GetCacheValue("CMAKE_CACHE_RELEASE_VERSION");
-  bool cacheSameCMake = false;
-  if(majv &&
-     atoi(majv) == static_cast<int>(cmVersion::GetMajorVersion())
-     && minv &&
-     atoi(minv) == static_cast<int>(cmVersion::GetMinorVersion())
-     && relv && (strcmp(relv, cmVersion::GetReleaseVersion().c_str()) == 0))
-    {
-    cacheSameCMake = true;
-    }
-  return cacheSameCMake;
-}
-
 void cmake::PreLoadCMakeFiles()
 {
   std::string pre_load = this->GetHomeDirectory();
diff --git a/Source/cmake.h b/Source/cmake.h
index c9c66c2b70..0a9a6e159b 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -398,8 +398,6 @@ protected:
   bool SuppressDevWarnings;
   bool DoSuppressDevWarnings;
 
-  ///! return true if the same cmake was used to make the cache.
-  bool CacheVersionMatches();
   ///! read in a cmake list file to initialize the cache
   void ReadListFile(const char *path);
 
-- 
GitLab