diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-14 16:22:15 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-18 14:09:11 (GMT) |
commit | 5536cec46e9af9af3ee5756e59b57bcb7fa23e44 (patch) | |
tree | 77f7ada4e645560d4094bf20ca8c3f40e2ba3b16 /Source | |
parent | 98d48469534f7a491b8c358d513472806c858d22 (diff) | |
download | CMake-5536cec46e9af9af3ee5756e59b57bcb7fa23e44.zip CMake-5536cec46e9af9af3ee5756e59b57bcb7fa23e44.tar.gz CMake-5536cec46e9af9af3ee5756e59b57bcb7fa23e44.tar.bz2 |
Rename cmFileTimeCache::FileTimeCompare to cmFileTimeCache::Compare
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 2 | ||||
-rw-r--r-- | Source/cmDepends.cxx | 7 | ||||
-rw-r--r-- | Source/cmFileTimeCache.cxx | 4 | ||||
-rw-r--r-- | Source/cmFileTimeCache.h | 3 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 5 | ||||
-rw-r--r-- | Source/cmake.cxx | 9 |
6 files changed, 13 insertions, 17 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 54d7705..8ea9a83 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -513,7 +513,7 @@ public: // Order files by modification time. Use lexicographic order // among files with the same time. int result; - if (this->FTC->FileTimeCompare(l, r, &result) && result != 0) { + if (this->FTC->Compare(l, r, &result) && result != 0) { return result < 0; } return l < r; diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index 1bfb370..efadaf1 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -177,8 +177,7 @@ bool cmDepends::CheckDependencies( if (dependerExists) { // The dependee and depender both exist. Compare file times. int result = 0; - if ((!this->FileTimeCache->FileTimeCompare(depender, dependee, - &result) || + if ((!this->FileTimeCache->Compare(depender, dependee, &result) || result < 0)) { // The depender is older than the dependee. regenerate = true; @@ -195,8 +194,8 @@ bool cmDepends::CheckDependencies( // The dependee exists, but the depender doesn't. Regenerate if the // internalDepends file is older than the dependee. int result = 0; - if ((!this->FileTimeCache->FileTimeCompare(internalDependsFileName, - dependee, &result) || + if ((!this->FileTimeCache->Compare(internalDependsFileName, dependee, + &result) || result < 0)) { // The depends-file is older than the dependee. regenerate = true; diff --git a/Source/cmFileTimeCache.cxx b/Source/cmFileTimeCache.cxx index 81912db..1fff6a9 100644 --- a/Source/cmFileTimeCache.cxx +++ b/Source/cmFileTimeCache.cxx @@ -29,8 +29,8 @@ bool cmFileTimeCache::Load(std::string const& fileName, cmFileTime& fileTime) return true; } -bool cmFileTimeCache::FileTimeCompare(std::string const& f1, - std::string const& f2, int* result) +bool cmFileTimeCache::Compare(std::string const& f1, std::string const& f2, + int* result) { // Get the modification time for each file. cmFileTime ft1, ft2; diff --git a/Source/cmFileTimeCache.h b/Source/cmFileTimeCache.h index 043b7aa..a47904c 100644 --- a/Source/cmFileTimeCache.h +++ b/Source/cmFileTimeCache.h @@ -34,8 +34,7 @@ public: * When true is returned, result has -1, 0, +1 for * f1 older, same, or newer than f2. */ - bool FileTimeCompare(std::string const& f1, std::string const& f2, - int* result); + bool Compare(std::string const& f1, std::string const& f2, int* result); /** * @brief Compare file modification times. diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index b835059..f3d5a94 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1277,8 +1277,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies( this->GlobalGenerator->GetCMakeInstance()->GetFileTimeCache(); { int result; - if (!ftc->FileTimeCompare(internalDependFile, tgtInfo, &result) || - result < 0) { + if (!ftc->Compare(internalDependFile, tgtInfo, &result) || result < 0) { if (verbose) { std::ostringstream msg; msg << "Dependee \"" << tgtInfo << "\" is newer than depender \"" @@ -1297,7 +1296,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies( dirInfoFile += "/CMakeFiles"; dirInfoFile += "/CMakeDirectoryInformation.cmake"; int result; - if (!ftc->FileTimeCompare(internalDependFile, dirInfoFile, &result) || + if (!ftc->Compare(internalDependFile, dirInfoFile, &result) || result < 0) { if (verbose) { std::ostringstream msg; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f2484b3..ff8dc43 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2139,7 +2139,7 @@ int cmake::CheckBuildSystem() std::string dep_newest = *dep++; for (; dep != depends.end(); ++dep) { int result = 0; - if (this->FileTimeCache->FileTimeCompare(dep_newest, *dep, &result)) { + if (this->FileTimeCache->Compare(dep_newest, *dep, &result)) { if (result < 0) { dep_newest = *dep; } @@ -2158,7 +2158,7 @@ int cmake::CheckBuildSystem() std::string out_oldest = *out++; for (; out != outputs.end(); ++out) { int result = 0; - if (this->FileTimeCache->FileTimeCompare(out_oldest, *out, &result)) { + if (this->FileTimeCache->Compare(out_oldest, *out, &result)) { if (result > 0) { out_oldest = *out; } @@ -2175,8 +2175,7 @@ int cmake::CheckBuildSystem() // If any output is older than any dependency then rerun. { int result = 0; - if (!this->FileTimeCache->FileTimeCompare(out_oldest, dep_newest, - &result) || + if (!this->FileTimeCache->Compare(out_oldest, dep_newest, &result) || result < 0) { if (verbose) { std::ostringstream msg; @@ -2436,7 +2435,7 @@ static bool cmakeCheckStampFile(const std::string& stampName) while (cmSystemTools::GetLineFromStream(fin, dep)) { int result; if (!dep.empty() && dep[0] != '#' && - (!ftc.FileTimeCompare(stampDepends, dep, &result) || result < 0)) { + (!ftc.Compare(stampDepends, dep, &result) || result < 0)) { // The stamp depends file is older than this dependency. The // build system is really out of date. std::cout << "CMake is re-running because " << stampName |