diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-02-14 16:46:19 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-02-19 11:35:39 (GMT) |
commit | ec24dcdb36db7b460113b2ce3f7a954800d41e90 (patch) | |
tree | ed109d0583398c94da803e79b9abaea407bcac44 | |
parent | 6b31416d6c9bdc8b89a918f217a6678cc6083fed (diff) | |
download | CMake-ec24dcdb36db7b460113b2ce3f7a954800d41e90.zip CMake-ec24dcdb36db7b460113b2ce3f7a954800d41e90.tar.gz CMake-ec24dcdb36db7b460113b2ce3f7a954800d41e90.tar.bz2 |
Autogen: Remove unnecessary test
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 69 |
1 files changed, 33 insertions, 36 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index df19a1c..4a88201 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -448,46 +448,43 @@ std::string cmQtAutoGenerators::RccSettingsStringCompose() void cmQtAutoGenerators::OldSettingsReadFile( cmMakefile* makefile, const std::string& targetDirectory) { - if (!this->MocExecutable.empty() || !this->UicExecutable.empty() || - !this->RccExecutable.empty()) { - // Compose current settings strings - this->MocSettingsString = this->MocSettingsStringCompose(); - this->UicSettingsString = this->UicSettingsStringCompose(); - this->RccSettingsString = this->RccSettingsStringCompose(); - - // Read old settings - const std::string filename = OldSettingsFile(targetDirectory); - if (makefile->ReadListFile(filename.c_str())) { - if (!this->MocExecutable.empty()) { - const std::string sol = makefile->GetSafeDefinition(MocOldSettingsKey); - if (sol != this->MocSettingsString) { - this->GenerateAllMoc = true; - } - } - if (!this->UicExecutable.empty()) { - const std::string sol = makefile->GetSafeDefinition(UicOldSettingsKey); - if (sol != this->UicSettingsString) { - this->GenerateAllUic = true; - } + // Compose current settings strings + this->MocSettingsString = this->MocSettingsStringCompose(); + this->UicSettingsString = this->UicSettingsStringCompose(); + this->RccSettingsString = this->RccSettingsStringCompose(); + + // Read old settings + const std::string filename = OldSettingsFile(targetDirectory); + if (makefile->ReadListFile(filename.c_str())) { + if (!this->MocExecutable.empty()) { + const std::string sol = makefile->GetSafeDefinition(MocOldSettingsKey); + if (sol != this->MocSettingsString) { + this->GenerateAllMoc = true; } - if (!this->RccExecutable.empty()) { - const std::string sol = makefile->GetSafeDefinition(RccOldSettingsKey); - if (sol != this->RccSettingsString) { - this->GenerateAllRcc = true; - } + } + if (!this->UicExecutable.empty()) { + const std::string sol = makefile->GetSafeDefinition(UicOldSettingsKey); + if (sol != this->UicSettingsString) { + this->GenerateAllUic = true; } - // In case any setting changed remove the old settings file. - // This triggers a full rebuild on the next run if the current - // build is aborted before writing the current settings in the end. - if (this->GenerateAllAny()) { - cmSystemTools::RemoveFile(filename); + } + if (!this->RccExecutable.empty()) { + const std::string sol = makefile->GetSafeDefinition(RccOldSettingsKey); + if (sol != this->RccSettingsString) { + this->GenerateAllRcc = true; } - } else { - // If the file could not be read re-generate everythiung. - this->GenerateAllMoc = true; - this->GenerateAllUic = true; - this->GenerateAllRcc = true; } + // In case any setting changed remove the old settings file. + // This triggers a full rebuild on the next run if the current + // build is aborted before writing the current settings in the end. + if (this->GenerateAllAny()) { + cmSystemTools::RemoveFile(filename); + } + } else { + // If the file could not be read re-generate everythiung. + this->GenerateAllMoc = true; + this->GenerateAllUic = true; + this->GenerateAllRcc = true; } } |