summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2016-12-02 11:13:59 (GMT)
committerBrad King <brad.king@kitware.com>2016-12-07 13:24:02 (GMT)
commitd9996aab74836bb830e106bea0b0064a4c74cb1c (patch)
treed7eedbd656e4b7014f794b9e50db77fc4cae4dde /Source
parentb770b85d6c05fd36462172e33c8b700b22b801e9 (diff)
downloadCMake-d9996aab74836bb830e106bea0b0064a4c74cb1c.zip
CMake-d9996aab74836bb830e106bea0b0064a4c74cb1c.tar.gz
CMake-d9996aab74836bb830e106bea0b0064a4c74cb1c.tar.bz2
QtAutogen: Inline single use variable definitions
Diffstat (limited to 'Source')
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index ca7ca8e..7448ec2 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -115,17 +115,14 @@ static void SetupSourceFiles(cmGeneratorTarget const* target,
for (std::vector<cmSourceFile*>::const_iterator fileIt = srcFiles.begin();
fileIt != srcFiles.end(); ++fileIt) {
cmSourceFile* sf = *fileIt;
- std::string absFile = cmsys::SystemTools::GetRealPath(sf->GetFullPath());
- bool skipFileForMoc =
- cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOMOC"));
- bool generated = cmSystemTools::IsOn(sf->GetPropertyForUser("GENERATED"));
+ const std::string absFile =
+ cmsys::SystemTools::GetRealPath(sf->GetFullPath());
+ const std::string ext = sf->GetExtension();
if (cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOUIC"))) {
skipUic.push_back(absFile);
}
- std::string ext = sf->GetExtension();
-
if (target->GetPropertyAsBool("AUTORCC")) {
if (ext == "qrc" &&
!cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC"))) {
@@ -146,8 +143,8 @@ static void SetupSourceFiles(cmGeneratorTarget const* target,
}
}
- if (!generated) {
- if (skipFileForMoc) {
+ if (!cmSystemTools::IsOn(sf->GetPropertyForUser("GENERATED"))) {
+ if (cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOMOC"))) {
skipMoc.push_back(absFile);
} else {
cmSystemTools::FileFormat fileType =