diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-13 18:10:19 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-18 14:09:11 (GMT) |
commit | 216416219ae438ec5e93a1e125298fa0b5fd64d9 (patch) | |
tree | e261b3d50b62af1c826b4d4a633bee541046c96d | |
parent | 31602583930b6c517c439ae8c15df26043031345 (diff) | |
download | CMake-216416219ae438ec5e93a1e125298fa0b5fd64d9.zip CMake-216416219ae438ec5e93a1e125298fa0b5fd64d9.tar.gz CMake-216416219ae438ec5e93a1e125298fa0b5fd64d9.tar.bz2 |
Rename cmFileTimeComparison to cmFileTimeCache
The name `cmFileTimeCache` reflects the functionality of the class more
appropriately.
-rw-r--r-- | Source/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 8 | ||||
-rw-r--r-- | Source/cmDepends.cxx | 2 | ||||
-rw-r--r-- | Source/cmDepends.h | 9 | ||||
-rw-r--r-- | Source/cmFileCopier.h | 4 | ||||
-rw-r--r-- | Source/cmFileTimeCache.cxx (renamed from Source/cmFileTimeComparison.cxx) | 17 | ||||
-rw-r--r-- | Source/cmFileTimeCache.h (renamed from Source/cmFileTimeComparison.h) | 16 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 4 | ||||
-rw-r--r-- | Source/cmake.cxx | 6 | ||||
-rw-r--r-- | Source/cmake.h | 6 | ||||
-rwxr-xr-x | bootstrap | 2 |
11 files changed, 37 insertions, 41 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index f615496..596c7f5 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -238,8 +238,8 @@ set(SRCS cmFilePathChecksum.h cmFileTime.cxx cmFileTime.h - cmFileTimeComparison.cxx - cmFileTimeComparison.h + cmFileTimeCache.cxx + cmFileTimeCache.h cmFortranParserImpl.cxx cmFSPermissions.cxx cmFSPermissions.h diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 07bc7e7..54d7705 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -5,7 +5,7 @@ #include "cmAlgorithms.h" #include "cmCTest.h" #include "cmDuration.h" -#include "cmFileTimeComparison.h" +#include "cmFileTimeCache.h" #include "cmGeneratedFileStream.h" #include "cmMakefile.h" #include "cmProcessOutput.h" @@ -503,7 +503,7 @@ void cmCTestBuildHandler::GenerateXMLHeader(cmXMLWriter& xml) class cmCTestBuildHandler::FragmentCompare { public: - FragmentCompare(cmFileTimeComparison* ftc) + FragmentCompare(cmFileTimeCache* ftc) : FTC(ftc) { } @@ -520,7 +520,7 @@ public: } private: - cmFileTimeComparison* FTC = nullptr; + cmFileTimeCache* FTC = nullptr; }; void cmCTestBuildHandler::GenerateXMLLaunched(cmXMLWriter& xml) @@ -530,7 +530,7 @@ void cmCTestBuildHandler::GenerateXMLLaunched(cmXMLWriter& xml) } // Sort XML fragments in chronological order. - cmFileTimeComparison ftc; + cmFileTimeCache ftc; FragmentCompare fragmentCompare(&ftc); typedef std::set<std::string, FragmentCompare> Fragments; Fragments fragments(fragmentCompare); diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index c128b02..4e97af2 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDepends.h" -#include "cmFileTimeComparison.h" +#include "cmFileTimeCache.h" #include "cmGeneratedFileStream.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" diff --git a/Source/cmDepends.h b/Source/cmDepends.h index 20c91ca..bbc79be 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -12,7 +12,7 @@ #include <string> #include <vector> -class cmFileTimeComparison; +class cmFileTimeCache; class cmLocalGenerator; /** \class cmDepends @@ -72,10 +72,7 @@ public: void Clear(const std::string& file); /** Set the file comparison object */ - void SetFileComparison(cmFileTimeComparison* fc) - { - this->FileComparison = fc; - } + void SetFileComparison(cmFileTimeCache* fc) { this->FileComparison = fc; } protected: // Write dependencies for the target file to the given stream. @@ -101,7 +98,7 @@ protected: // Flag for verbose output. bool Verbose = false; - cmFileTimeComparison* FileComparison = nullptr; + cmFileTimeCache* FileComparison = nullptr; std::string Language; diff --git a/Source/cmFileCopier.h b/Source/cmFileCopier.h index a11c371..003b8f6 100644 --- a/Source/cmFileCopier.h +++ b/Source/cmFileCopier.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include "cmFileTimeComparison.h" +#include "cmFileTimeCache.h" #include "cm_sys_stat.h" #include "cmsys/RegularExpression.hxx" @@ -28,7 +28,7 @@ protected: cmMakefile* Makefile; const char* Name; bool Always; - cmFileTimeComparison FileTimes; + cmFileTimeCache FileTimes; // Whether to install a file not matching any expression. bool MatchlessFiles; diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeCache.cxx index 2115029..ff205b7 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeCache.cxx @@ -1,17 +1,16 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmFileTimeComparison.h" +#include "cmFileTimeCache.h" #include <string> #include <unordered_map> #include <utility> -cmFileTimeComparison::cmFileTimeComparison() = default; +cmFileTimeCache::cmFileTimeCache() = default; -cmFileTimeComparison::~cmFileTimeComparison() = default; +cmFileTimeCache::~cmFileTimeCache() = default; -bool cmFileTimeComparison::Load(std::string const& fileName, - cmFileTime& fileTime) +bool cmFileTimeCache::Load(std::string const& fileName, cmFileTime& fileTime) { // Use the stored time if available. { @@ -30,8 +29,8 @@ bool cmFileTimeComparison::Load(std::string const& fileName, return true; } -bool cmFileTimeComparison::FileTimeCompare(std::string const& f1, - std::string const& f2, int* result) +bool cmFileTimeCache::FileTimeCompare(std::string const& f1, + std::string const& f2, int* result) { // Get the modification time for each file. cmFileTime ft1, ft2; @@ -45,8 +44,8 @@ bool cmFileTimeComparison::FileTimeCompare(std::string const& f1, return false; } -bool cmFileTimeComparison::FileTimesDiffer(std::string const& f1, - std::string const& f2) +bool cmFileTimeCache::FileTimesDiffer(std::string const& f1, + std::string const& f2) { // Get the modification time for each file. cmFileTime ft1, ft2; diff --git a/Source/cmFileTimeComparison.h b/Source/cmFileTimeCache.h index 80ea409..d284fdb 100644 --- a/Source/cmFileTimeComparison.h +++ b/Source/cmFileTimeCache.h @@ -1,7 +1,7 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmFileTimeComparison_h -#define cmFileTimeComparison_h +#ifndef cmFileTimeCache_h +#define cmFileTimeCache_h #include "cmConfigure.h" // IWYU pragma: keep @@ -9,17 +9,17 @@ #include <string> #include <unordered_map> -/** \class cmFileTimeComparison +/** \class cmFileTimeCache * \brief Caches file modification times in an internal map for fast lookups. */ -class cmFileTimeComparison +class cmFileTimeCache { public: - cmFileTimeComparison(); - ~cmFileTimeComparison(); + cmFileTimeCache(); + ~cmFileTimeCache(); - cmFileTimeComparison(const cmFileTimeComparison&) = delete; - cmFileTimeComparison& operator=(const cmFileTimeComparison&) = delete; + cmFileTimeCache(const cmFileTimeCache&) = delete; + cmFileTimeCache& operator=(const cmFileTimeCache&) = delete; /** * @brief Loads the file time from the cache or the file system. diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index d1093be..30b9790 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -12,7 +12,7 @@ #include "cmAlgorithms.h" #include "cmCustomCommandGenerator.h" -#include "cmFileTimeComparison.h" +#include "cmFileTimeCache.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" @@ -1273,7 +1273,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies( // happen when a new source file is added and CMake regenerates the // project but no other sources were touched. bool needRescanDependInfo = false; - cmFileTimeComparison* ftc = + cmFileTimeCache* ftc = this->GlobalGenerator->GetCMakeInstance()->GetFileComparison(); { int result; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 08e284e..84ac5b1 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -9,7 +9,7 @@ #include "cmDocumentationFormatter.h" #include "cmDuration.h" #include "cmExternalMakefileProjectGenerator.h" -#include "cmFileTimeComparison.h" +#include "cmFileTimeCache.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmGlobalGeneratorFactory.h" @@ -138,7 +138,7 @@ cmake::cmake(Role role, cmState::Mode mode) this->DebugOutput = false; this->DebugTryCompile = false; this->ClearBuildSystem = false; - this->FileComparison = new cmFileTimeComparison; + this->FileComparison = new cmFileTimeCache; this->State = new cmState; this->State->SetMode(mode); @@ -2431,7 +2431,7 @@ static bool cmakeCheckStampFile(const std::string& stampName) } // Compare the stamp dependencies against the dependency file itself. - cmFileTimeComparison ftc; + cmFileTimeCache ftc; std::string dep; while (cmSystemTools::GetLineFromStream(fin, dep)) { int result; diff --git a/Source/cmake.h b/Source/cmake.h index 1ffeabc..a9aaaeb 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -26,7 +26,7 @@ class cmExternalMakefileProjectGeneratorFactory; class cmFileAPI; -class cmFileTimeComparison; +class cmFileTimeCache; class cmGlobalGenerator; class cmGlobalGeneratorFactory; class cmMakefile; @@ -329,7 +329,7 @@ public: /** * Get the file comparison class */ - cmFileTimeComparison* GetFileComparison() { return this->FileComparison; } + cmFileTimeCache* GetFileComparison() { return this->FileComparison; } // Do we want debug output during the cmake run. bool GetDebugOutput() { return this->DebugOutput; } @@ -509,7 +509,7 @@ private: std::unordered_set<std::string> HeaderFileExtensionsSet; bool ClearBuildSystem; bool DebugTryCompile; - cmFileTimeComparison* FileComparison; + cmFileTimeCache* FileComparison; std::string GraphVizFile; InstalledFilesMap InstalledFiles; @@ -305,7 +305,7 @@ CMAKE_CXX_SOURCES="\ cmFileCopier \ cmFileInstaller \ cmFileTime \ - cmFileTimeComparison \ + cmFileTimeCache \ cmFindBase \ cmFindCommon \ cmFindFileCommand \ |