From 06430919f4b903ba256ce158caf223f515faa8a4 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Wed, 11 Jan 2017 14:56:44 +0100 Subject: Autogen: Generators: Use FileAbsentOrOlder for UIC tests --- Source/cmQtAutoGenerators.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index d4997d5..645ecc0 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1246,10 +1246,12 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName, this->AutogenBuildSubDir + "include/" + uiOutputFile; const std::string uicFileAbs = this->CurrentBinaryDir + uicFileRel; - int sourceNewerThanUi = 0; - bool success = cmsys::SystemTools::FileTimeCompare(uiInputFile, uicFileAbs, - &sourceNewerThanUi); - if (this->GenerateAll || !success || sourceNewerThanUi >= 0) { + bool generateUic = this->GenerateAll; + // Test if the source file is newer that the build file + if (!generateUic) { + generateUic = FileAbsentOrOlder(uicFileAbs, uiInputFile); + } + if (generateUic) { // Log this->LogBold("Generating UIC header " + uicFileRel); -- cgit v0.12