mirror of
https://github.com/reactos/CMake.git
synced 2025-01-20 18:34:22 +00:00
Rename cmFileTimeCache::FileTimeCompare to cmFileTimeCache::Compare
This commit is contained in:
parent
98d4846953
commit
5536cec46e
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user