From 199b28ac3ab5cc2dc99b352b8653a03f93baf3e5 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 18 Mar 2015 21:18:44 +0100 Subject: Remove duplicate tag name. --- Source/cmGeneratorExpressionNode.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 673dcb9..2654851 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1554,7 +1554,6 @@ class ArtifactPdbTag; class ArtifactPathTag; class ArtifactDirTag; -class ArtifactNameTag; //---------------------------------------------------------------------------- template -- cgit v0.12 From fe17092c20c39761a060508fc6b1979b06e84afe Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 4 Apr 2015 15:30:25 +0200 Subject: cmMakefile: Remove bogus comment. --- Source/cmMakefile.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index ebfe508..e18a4a7 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -776,10 +776,6 @@ public: ///enabled. void EnableLanguage(std::vectorconst& languages, bool optional); - /** - * Set/Get the name of the parent directories CMakeLists file - * given a current CMakeLists file name - */ cmCacheManager *GetCacheManager() const; /** -- cgit v0.12 From 257c16495ae0653d8f3630c8d76e6496bc9edd86 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 4 Apr 2015 15:47:24 +0200 Subject: cmListFile: Remove unused member. It is written, but not read since commit v2.4.0~575 (ENH: Since list file cache does not make much sense any more ..., 2006-02-07). --- Source/cmListFileCache.cxx | 6 ------ Source/cmListFileCache.h | 5 ----- 2 files changed, 11 deletions(-) diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 3e26349..ddcea9b 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -146,18 +146,12 @@ bool cmListFile::ParseFile(const char* filename, } bool parseError = false; - this->ModifiedTime = cmSystemTools::ModifiedTime(filename); { cmListFileParser parser(this, mf, filename); parseError = !parser.ParseFile(); } - if(parseError) - { - this->ModifiedTime = 0; - } - // do we need a cmake_policy(VERSION call? if(topLevel) { diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 2ca9b8e..544ff1b 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -85,15 +85,10 @@ class cmListFileBacktrace: public std::vector struct cmListFile { - cmListFile() - :ModifiedTime(0) - { - } bool ParseFile(const char* path, bool topLevel, cmMakefile *mf); - long int ModifiedTime; std::vector Functions; }; -- cgit v0.12 From a469bf7b98bb2fc82de874383b0538e2d32ab2e1 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 4 Apr 2015 15:47:49 +0200 Subject: cmMakefile: Remove one wrong and one insufficiently helpful comment. --- Source/cmMakefile.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index e18a4a7..7c2085a 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -981,9 +981,8 @@ protected: // directories. std::set SystemIncludeDirectories; - std::vector ListFiles; // list of command files loaded - std::vector OutputFiles; // list of command files loaded - + std::vector ListFiles; + std::vector OutputFiles; cmTarget::LinkLibraryVectorType LinkLibraries; -- cgit v0.12 From 47acfe1d1e480bee109efa2de9253cf1a5457a8e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 4 Apr 2015 23:46:14 +0200 Subject: cmake: Remove unused member. --- Source/cmake.cxx | 1 - Source/cmake.h | 1 - 2 files changed, 2 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 51df7f2..3dc50ab 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -188,7 +188,6 @@ void cmake::InitializeProperties() { this->Properties.clear(); this->Properties.SetCMakeInstance(this); - this->AccessedProperties.clear(); this->PropertyDefinitions.clear(); // initialize properties diff --git a/Source/cmake.h b/Source/cmake.h index 60ffcd4..79ccc33 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -383,7 +383,6 @@ protected: void InitializeProperties(); int HandleDeleteCacheVariables(const std::string& var); cmPropertyMap Properties; - std::set > AccessedProperties; std::map PropertyDefinitions; -- cgit v0.12 From 364c7ea187d67f702891b201970712806999ad07 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 5 Apr 2015 01:29:45 +0200 Subject: cmake: Remove unused method. --- Source/cmake.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Source/cmake.h b/Source/cmake.h index 79ccc33..c22b329 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -287,9 +287,6 @@ class cmake cmProperty::ScopeType scope); bool GetPropertyAsBool(const std::string& prop); - // Get the properties - cmPropertyMap &GetProperties() { return this->Properties; } - ///! Get or create an cmInstalledFile instance and return a pointer to it cmInstalledFile *GetOrCreateInstalledFile( cmMakefile* mf, const std::string& name); -- cgit v0.12 From d280bae98f009b56b9c14243981d5aba3e2f8747 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 5 Apr 2015 10:11:30 +0200 Subject: cmake: Be clear that there is no chaining after global properties. --- Source/cmake.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 3dc50ab..3381447 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2273,8 +2273,6 @@ const char *cmake::GetProperty(const std::string& prop) const char *cmake::GetProperty(const std::string& prop, cmProperty::ScopeType scope) { - bool chain = false; - // watch for special properties std::string output = ""; if ( prop == "CACHE_VARIABLES" ) @@ -2332,7 +2330,8 @@ const char *cmake::GetProperty(const std::string& prop, return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1; } #undef STRING_LIST_ELEMENT - return this->Properties.GetPropertyValue(prop, scope, chain); + bool dummy = false; + return this->Properties.GetPropertyValue(prop, scope, dummy); } bool cmake::GetPropertyAsBool(const std::string& prop) -- cgit v0.12 From 629e94893668c69fccb6954b0fc807c54e9218dd Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 5 Apr 2015 01:58:15 +0200 Subject: cmake: Clear member rather than explicit erase. --- Source/cmake.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 3381447..5c52a1a 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -212,7 +212,7 @@ void cmake::CleanupCommandsAndMacros() delete j->second; } } - this->Commands.erase(this->Commands.begin(), this->Commands.end()); + this->Commands.clear(); std::vector::iterator it; for ( it = commands.begin(); it != commands.end(); ++ it ) -- cgit v0.12 From 510562e3e7b9387bebe14060b147ec3022ee58a3 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 4 Apr 2015 20:36:06 +0200 Subject: cmGlobalGenerator: Don't fetch the cache manager in a loop. It doesn't change from Makefile to Makefile. --- Source/cmGlobalGenerator.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 8123c99..3c0a0e2 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1537,10 +1537,9 @@ void cmGlobalGenerator::CheckLocalGenerators() std::map notFoundMap; // std::set notFoundMap; // after it is all done do a ConfigureFinalPass - cmCacheManager* manager = 0; + cmCacheManager* manager = this->GetCMakeInstance()->GetCacheManager(); for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) { - manager = this->LocalGenerators[i]->GetMakefile()->GetCacheManager(); this->LocalGenerators[i]->ConfigureFinalPass(); cmTargets &targets = this->LocalGenerators[i]->GetMakefile()->GetTargets(); -- cgit v0.12 From 23bb5d225b772f7e18dab16375c7620c99d62814 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 4 Apr 2015 20:24:11 +0200 Subject: cmCacheManager: Remove use of intermediate overload. --- Source/cmCacheManager.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 0c77891..30791ff 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -84,7 +84,8 @@ bool cmCacheManager::LoadCache(cmMakefile* mf) bool cmCacheManager::LoadCache(const std::string& path) { - return this->LoadCache(path,true); + std::set emptySet; + return this->LoadCache(path, true, emptySet, emptySet); } bool cmCacheManager::LoadCache(const std::string& path, -- cgit v0.12 From 64556e3dfa4161b33110daba606439f2c7971b15 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 4 Apr 2015 20:24:34 +0200 Subject: cmCacheManager: Remove unused overloads. --- Source/cmCacheManager.cxx | 19 ------------------- Source/cmCacheManager.h | 5 ----- 2 files changed, 24 deletions(-) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 30791ff..002ccd1 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -76,25 +76,12 @@ bool cmCacheManager::IsType(const char* s) return false; } -bool cmCacheManager::LoadCache(cmMakefile* mf) -{ - return this->LoadCache(mf->GetHomeOutputDirectory()); -} - - bool cmCacheManager::LoadCache(const std::string& path) { std::set emptySet; return this->LoadCache(path, true, emptySet, emptySet); } -bool cmCacheManager::LoadCache(const std::string& path, - bool internal) -{ - std::set emptySet; - return this->LoadCache(path, internal, emptySet, emptySet); -} - static bool ParseEntryWithoutType(const std::string& entry, std::string& var, std::string& value) @@ -419,12 +406,6 @@ void cmCacheManager::WritePropertyEntries(std::ostream& os, } } -bool cmCacheManager::SaveCache(cmMakefile* mf) -{ - return this->SaveCache(mf->GetHomeOutputDirectory()); -} - - bool cmCacheManager::SaveCache(const std::string& path) { std::string cacheFile = path; diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index d9a9112..659d44a 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -105,17 +105,12 @@ public: static const char* TypeToString(CacheEntryType); static bool IsType(const char*); - ///! Load a cache for given makefile. Loads from ouput home. - bool LoadCache(cmMakefile*); ///! Load a cache for given makefile. Loads from path/CMakeCache.txt. bool LoadCache(const std::string& path); - bool LoadCache(const std::string& path, bool internal); bool LoadCache(const std::string& path, bool internal, std::set& excludes, std::set& includes); - ///! Save cache for given makefile. Saves to ouput home CMakeCache.txt. - bool SaveCache(cmMakefile*) ; ///! Save cache for given makefile. Saves to ouput path/CMakeCache.txt bool SaveCache(const std::string& path) ; -- cgit v0.12 From c37cf7fa9e0aa7f7c3a2b32457385a1caf37bc3c Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 4 Apr 2015 20:42:28 +0200 Subject: cmCacheManager: Remove unused method --- Source/cmCacheManager.cxx | 18 ------------------ Source/cmCacheManager.h | 1 - Source/cmMakefile.cxx | 5 ----- Source/cmMakefile.h | 3 --- 4 files changed, 27 deletions(-) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 002ccd1..fa7eff3 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -896,21 +896,3 @@ bool cmCacheManager::CacheIterator::PropertyExists( { return this->GetProperty(prop)? true:false; } - -//---------------------------------------------------------------------------- -bool cmCacheManager::NeedCacheCompatibility(int major, int minor) -{ - // Compatibility is not needed if the cache version is zero because - // the cache was created or modified by the user. - if(this->CacheMajorVersion == 0) - { - return false; - } - - // Compatibility is needed if the cache version is equal to or lower - // than the given version. - cmIML_INT_uint64_t actual_compat = - CMake_VERSION_ENCODE(this->CacheMajorVersion, this->CacheMinorVersion, 0); - return (actual_compat && - actual_compat <= CMake_VERSION_ENCODE(major, minor, 0)); -} diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index 659d44a..f7f8776 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -144,7 +144,6 @@ public: { return this->CacheMajorVersion; } unsigned int GetCacheMinorVersion() const { return this->CacheMinorVersion; } - bool NeedCacheCompatibility(int major, int minor); protected: ///! Add an entry into the cache diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ec1d814..215ee16 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -184,11 +184,6 @@ unsigned int cmMakefile::GetCacheMinorVersion() const return this->GetCacheManager()->GetCacheMinorVersion(); } -bool cmMakefile::NeedCacheCompatibility(int major, int minor) const -{ - return this->GetCacheManager()->NeedCacheCompatibility(major, minor); -} - cmMakefile::~cmMakefile() { cmDeleteAll(this->InstallGenerators); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 7c2085a..920b6b7 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -78,9 +78,6 @@ public: bool VariableInitialized(const std::string& ) const; /* return true if a variable has been used */ bool VariableUsed(const std::string& ) const; - /** Return whether compatibility features needed for a version of - the cache or lower should be enabled. */ - bool NeedCacheCompatibility(int major, int minor) const; /** * Construct an empty makefile. -- cgit v0.12