diff options
author | Brad King <brad.king@kitware.com> | 2009-09-11 14:04:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-09-11 14:04:10 (GMT) |
commit | 74b79d3b3996c1aed1d11ddfc06278f7f880454d (patch) | |
tree | 1096254426a8da346dff22462a6582402b99e321 /Source | |
parent | 7a409fd573721ae4346bee682d80fb285ab98497 (diff) | |
download | CMake-74b79d3b3996c1aed1d11ddfc06278f7f880454d.zip CMake-74b79d3b3996c1aed1d11ddfc06278f7f880454d.tar.gz CMake-74b79d3b3996c1aed1d11ddfc06278f7f880454d.tar.bz2 |
Remove barely-used cmCacheManager::AddCacheEntry
The commit "Remove barely-used cmMakefile::AddCacheDefinition" removed
all but one use of the cmCacheManager method 'bool' overload. This
commit removes the other use and the entire method, thus reducing code
duplication.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCacheManager.cxx | 13 | ||||
-rw-r--r-- | Source/cmCacheManager.h | 3 | ||||
-rw-r--r-- | Source/cmake.cxx | 5 |
3 files changed, 3 insertions, 18 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 4c57c5f..6af748f 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -766,19 +766,6 @@ void cmCacheManager::AddCacheEntry(const char* key, this->Cache[key] = e; } -void cmCacheManager::AddCacheEntry(const char* key, bool v, - const char* helpString) -{ - if(v) - { - this->AddCacheEntry(key, "ON", helpString, cmCacheManager::BOOL); - } - else - { - this->AddCacheEntry(key, "OFF", helpString, cmCacheManager::BOOL); - } -} - bool cmCacheManager::CacheIterator::IsAtEnd() const { return this->Position == this->Container.Cache.end(); diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index 2ac6994..8d27f5f 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -164,9 +164,6 @@ protected: void AddCacheEntry(const char* key, const char* value, const char* helpString, CacheEntryType type); - ///! Add a BOOL entry into the cache - void AddCacheEntry(const char* key, bool, const char* helpString); - ///! Get a cache entry object for a key CacheEntry *GetCacheEntry(const char *key); ///! Clean out the CMakeFiles directory if no CMakeCache.txt diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 7866fb2..a3555b9 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2153,8 +2153,9 @@ int cmake::ActualConfigure() if(!this->CacheManager->GetCacheValue("CMAKE_USE_RELATIVE_PATHS")) { this->CacheManager->AddCacheEntry - ("CMAKE_USE_RELATIVE_PATHS", false, - "If true, cmake will use relative paths in makefiles and projects."); + ("CMAKE_USE_RELATIVE_PATHS", "OFF", + "If true, cmake will use relative paths in makefiles and projects.", + cmCacheManager::BOOL); cmCacheManager::CacheIterator it = this->CacheManager->GetCacheIterator("CMAKE_USE_RELATIVE_PATHS"); if ( !it.PropertyExists("ADVANCED") ) |