diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-11 19:30:20 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-11 20:15:47 (GMT) |
commit | bd6c3f8609b87f6995acb2aef21aa572f0f73fa7 (patch) | |
tree | 60f231a14ed43cefe5475d6149b1c940c8b73a29 /Source/cmQtAutoRcc.cxx | |
parent | 54903af84bc8656344e7fe1ea0a11d5f09e94f86 (diff) | |
download | CMake-bd6c3f8609b87f6995acb2aef21aa572f0f73fa7.zip CMake-bd6c3f8609b87f6995acb2aef21aa572f0f73fa7.tar.gz CMake-bd6c3f8609b87f6995acb2aef21aa572f0f73fa7.tar.bz2 |
AutoRcc: Rebuild if the rcc executable is newer than its output
In AUTORCC add a test if the rcc executable is newer that the rcc output.
If the rcc executable is newer, rebuild the output.
Diffstat (limited to 'Source/cmQtAutoRcc.cxx')
-rw-r--r-- | Source/cmQtAutoRcc.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmQtAutoRcc.cxx b/Source/cmQtAutoRcc.cxx index 7063f6a..922767d 100644 --- a/Source/cmQtAutoRcc.cxx +++ b/Source/cmQtAutoRcc.cxx @@ -75,6 +75,13 @@ bool cmQtAutoRcc::Init(cmMakefile* makefile) // - Rcc executable RccExecutable_ = InfoGet("ARCC_RCC_EXECUTABLE"); + if (!RccExecutableTime_.Load(RccExecutable_)) { + std::string error = "The rcc executable "; + error += Quoted(RccExecutable_); + error += " does not exist."; + Log().ErrorFile(GenT::RCC, InfoFile(), error); + return false; + } RccListOptions_ = InfoGetList("ARCC_RCC_LIST_OPTIONS"); // - Job @@ -336,6 +343,18 @@ bool cmQtAutoRcc::TestQrcRccFiles(bool& generate) return true; } + // Test if the rcc output file is older than the rcc executable + if (RccFileTime_.Older(RccExecutableTime_)) { + if (Log().Verbose()) { + Reason = "Generating "; + Reason += Quoted(RccFileOutput_); + Reason += ", because it is older than the rcc executable, from "; + Reason += Quoted(QrcFile_); + } + generate = true; + return true; + } + return true; } |