Commit a6d75a1c authored by Sebastian Holtermann's avatar Sebastian Holtermann

Substitute FileComparison in variable names with FileTimeCache

parent 21641621
......@@ -177,8 +177,8 @@ bool cmDepends::CheckDependencies(
if (dependerExists) {
// The dependee and depender both exist. Compare file times.
int result = 0;
if ((!this->FileComparison->FileTimeCompare(depender, dependee,
&result) ||
if ((!this->FileTimeCache->FileTimeCompare(depender, dependee,
&result) ||
result < 0)) {
// The depender is older than the dependee.
regenerate = true;
......@@ -195,8 +195,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->FileComparison->FileTimeCompare(internalDependsFileName,
dependee, &result) ||
if ((!this->FileTimeCache->FileTimeCompare(internalDependsFileName,
dependee, &result) ||
result < 0)) {
// The depends-file is older than the dependee.
regenerate = true;
......
......@@ -72,7 +72,7 @@ public:
void Clear(const std::string& file);
/** Set the file comparison object */
void SetFileComparison(cmFileTimeCache* fc) { this->FileComparison = fc; }
void SetFileTimeCache(cmFileTimeCache* fc) { this->FileTimeCache = fc; }
protected:
// Write dependencies for the target file to the given stream.
......@@ -98,7 +98,7 @@ protected:
// Flag for verbose output.
bool Verbose = false;
cmFileTimeCache* FileComparison = nullptr;
cmFileTimeCache* FileTimeCache = nullptr;
std::string Language;
......
......@@ -1274,7 +1274,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(
// project but no other sources were touched.
bool needRescanDependInfo = false;
cmFileTimeCache* ftc =
this->GlobalGenerator->GetCMakeInstance()->GetFileComparison();
this->GlobalGenerator->GetCMakeInstance()->GetFileTimeCache();
{
int result;
if (!ftc->FileTimeCompare(internalDependFile, tgtInfo, &result) ||
......@@ -1318,7 +1318,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(
if (!needRescanDirInfo) {
cmDependsC checker;
checker.SetVerbose(verbose);
checker.SetFileComparison(ftc);
checker.SetFileTimeCache(ftc);
// cmDependsC::Check() fills the vector validDependencies() with the
// dependencies for those files where they are still valid, i.e. neither
// the files themselves nor any files they depend on have changed.
......@@ -1439,8 +1439,8 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(
if (scanner) {
scanner->SetLocalGenerator(this);
scanner->SetFileComparison(
this->GlobalGenerator->GetCMakeInstance()->GetFileComparison());
scanner->SetFileTimeCache(
this->GlobalGenerator->GetCMakeInstance()->GetFileTimeCache());
scanner->SetLanguage(lang);
scanner->SetTargetDirectory(targetDir);
scanner->Write(ruleFileStream, internalRuleFileStream);
......
......@@ -138,7 +138,7 @@ cmake::cmake(Role role, cmState::Mode mode)
this->DebugOutput = false;
this->DebugTryCompile = false;
this->ClearBuildSystem = false;
this->FileComparison = new cmFileTimeCache;
this->FileTimeCache = new cmFileTimeCache;
this->State = new cmState;
this->State->SetMode(mode);
......@@ -222,7 +222,7 @@ cmake::~cmake()
#ifdef CMAKE_BUILD_WITH_CMAKE
delete this->VariableWatch;
#endif
delete this->FileComparison;
delete this->FileTimeCache;
}
#if defined(CMAKE_BUILD_WITH_CMAKE)
......@@ -2139,7 +2139,7 @@ int cmake::CheckBuildSystem()
std::string dep_newest = *dep++;
for (; dep != depends.end(); ++dep) {
int result = 0;
if (this->FileComparison->FileTimeCompare(dep_newest, *dep, &result)) {
if (this->FileTimeCache->FileTimeCompare(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->FileComparison->FileTimeCompare(out_oldest, *out, &result)) {
if (this->FileTimeCache->FileTimeCompare(out_oldest, *out, &result)) {
if (result > 0) {
out_oldest = *out;
}
......@@ -2175,8 +2175,8 @@ int cmake::CheckBuildSystem()
// If any output is older than any dependency then rerun.
{
int result = 0;
if (!this->FileComparison->FileTimeCompare(out_oldest, dep_newest,
&result) ||
if (!this->FileTimeCache->FileTimeCompare(out_oldest, dep_newest,
&result) ||
result < 0) {
if (verbose) {
std::ostringstream msg;
......
......@@ -329,7 +329,7 @@ public:
/**
* Get the file comparison class
*/
cmFileTimeCache* GetFileComparison() { return this->FileComparison; }
cmFileTimeCache* GetFileTimeCache() { return this->FileTimeCache; }
// 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;
cmFileTimeCache* FileComparison;
cmFileTimeCache* FileTimeCache;
std::string GraphVizFile;
InstalledFilesMap InstalledFiles;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment