summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-02-14 16:42:52 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-02-19 11:35:39 (GMT)
commit6b31416d6c9bdc8b89a918f217a6678cc6083fed (patch)
tree95989a837b4fcc47ab58cd143480f52fb2306aa4
parent1bd74130f2a804d073081f7e3e4f307c3fecb07c (diff)
downloadCMake-6b31416d6c9bdc8b89a918f217a6678cc6083fed.zip
CMake-6b31416d6c9bdc8b89a918f217a6678cc6083fed.tar.gz
CMake-6b31416d6c9bdc8b89a918f217a6678cc6083fed.tar.bz2
Autogen: Add GenerateAllAny flag test method
-rw-r--r--Source/cmQtAutoGenerators.cxx5
-rw-r--r--Source/cmQtAutoGenerators.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 765cb74..df19a1c 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -479,8 +479,7 @@ void cmQtAutoGenerators::OldSettingsReadFile(
// 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->GenerateAllMoc || this->GenerateAllUic ||
- this->GenerateAllRcc) {
+ if (this->GenerateAllAny()) {
cmSystemTools::RemoveFile(filename);
}
} else {
@@ -497,7 +496,7 @@ bool cmQtAutoGenerators::OldSettingsWriteFile(
{
bool success = true;
// Only write if any setting changed
- if (this->GenerateAllMoc || this->GenerateAllUic || this->GenerateAllRcc) {
+ if (this->GenerateAllAny()) {
const std::string filename = OldSettingsFile(targetDirectory);
cmsys::ofstream outfile;
outfile.open(filename.c_str(), std::ios::trunc);
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index 8dd44f6..d442ec3 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -108,6 +108,12 @@ private:
std::multimap<std::string, std::string>& collisions);
bool MakeParentDirectory(const std::string& filename);
+ bool GenerateAllAny()
+ {
+ return (this->GenerateAllMoc || this->GenerateAllRcc ||
+ this->GenerateAllUic);
+ }
+
// - Target names
std::string OriginTargetName;
std::string AutogenTargetName;