summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-09 16:05:45 (GMT)
committerBrad King <brad.king@kitware.com>2016-11-09 16:22:07 (GMT)
commite4232b82e6d285edf9038e2f352df61ab362b6fd (patch)
tree9310038eab70b55a4e614472f211dab6f892c9a9 /Source/cmQtAutoGenerators.cxx
parentadf5f253ec029aec4ee7aadb95c6f908030fb98b (diff)
downloadCMake-e4232b82e6d285edf9038e2f352df61ab362b6fd.zip
CMake-e4232b82e6d285edf9038e2f352df61ab362b6fd.tar.gz
CMake-e4232b82e6d285edf9038e2f352df61ab362b6fd.tar.bz2
QtAutogen: Do not re-generate AUTORCC outputs on every build
Refactoring in commit v3.6.0-rc1~134^2~10 (Autogen: Split out moc file generation code to dedicated method, 2016-04-18) removed the unconditional creation of the `<target>_automoc.cpp` file. Now it is generated only when `AUTOMOC` is enabled. However, if this file is not created then our internal `GenerateAll` setting is enabled on every build, causing `AUTORCC` to re-generate its file(s) every time. Fix the `GenerateAll` setting to be used only for when autogen settings change. The old logic was left from when we had only automoc. Closes: #16413
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index b66257c..84d00ea 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -455,8 +455,8 @@ static std::string ReadAll(const std::string& filename)
bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
{
- if (!cmsys::SystemTools::FileExists(this->OutMocCppFilenameAbs.c_str()) ||
- (this->OldCompileSettingsStr != this->CurrentCompileSettingsStr)) {
+ // If settings changed everything needs to be re-generated.
+ if (this->OldCompileSettingsStr != this->CurrentCompileSettingsStr) {
this->GenerateAll = true;
}