From 9470b056fc0be0910f90230e0635d4a2e2baa81a Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 20 Sep 2015 16:52:32 +0200 Subject: QtAutogen: Move condition to prior loop. --- Source/cmGlobalGenerator.cxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 82d8d39..f9a65ee 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1429,6 +1429,13 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) { continue; } + if((!ti->second.GetPropertyAsBool("AUTOMOC") + && !ti->second.GetPropertyAsBool("AUTOUIC") + && !ti->second.GetPropertyAsBool("AUTORCC")) + || ti->second.IsImported()) + { + continue; + } targetNames.push_back(ti->second.GetName()); } for(std::vector::iterator ti = targetNames.begin(); @@ -1436,17 +1443,12 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) { cmTarget& target = *this->LocalGenerators[i] ->GetMakefile()->FindTarget(*ti, true); - if((target.GetPropertyAsBool("AUTOMOC") - || target.GetPropertyAsBool("AUTOUIC") - || target.GetPropertyAsBool("AUTORCC")) - && !target.IsImported()) + + if(cmQtAutoGenerators::InitializeAutogenTarget( + this->LocalGenerators[i], &target)) { - if(cmQtAutoGenerators::InitializeAutogenTarget( - this->LocalGenerators[i], &target)) - { - cmQtAutoGenerators autogen; - autogens.push_back(std::make_pair(autogen, &target)); - } + cmQtAutoGenerators autogen; + autogens.push_back(std::make_pair(autogen, &target)); } } } -- cgit v0.12