Autogen: Touch moc_predefs.h when it's content didn't change

This commit is contained in:
Sebastian Holtermann
2017-09-01 00:36:23 +02:00
parent f23a24c287
commit ed216b32a5
+7
View File
@@ -1227,6 +1227,7 @@ bool cmQtAutoGenerators::MocGenerateAll(
return false;
}
}
// (Re)write predefs file only on demand
if (this->FileDiffers(this->MocPredefsFileAbs, output)) {
if (this->FileWrite(cmQtAutoGen::MOC, this->MocPredefsFileAbs,
@@ -1235,6 +1236,12 @@ bool cmQtAutoGenerators::MocGenerateAll(
} else {
return false;
}
} else {
// Touch to update the time stamp
if (this->Verbose) {
this->LogInfo("Touching MOC predefs " + this->MocPredefsFileRel);
}
cmSystemTools::Touch(this->MocPredefsFileAbs, false);
}
}
}