summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-09-26 15:50:55 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-09-26 17:32:54 (GMT)
commit12f0e13c5f546a721d893adedba327c18c5c9e5e (patch)
treec99e4314bf9faa75f646c1d275658f8816041ed2 /Source
parent65ff75d3f5bf117508ba046779cdad323e077220 (diff)
downloadCMake-12f0e13c5f546a721d893adedba327c18c5c9e5e.zip
CMake-12f0e13c5f546a721d893adedba327c18c5c9e5e.tar.gz
CMake-12f0e13c5f546a721d893adedba327c18c5c9e5e.tar.bz2
QtAutogen: Simplify generator initialization API.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx21
-rw-r--r--Source/cmGlobalGenerator.h5
2 files changed, 12 insertions, 14 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 50906b8..5848a88 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1251,8 +1251,8 @@ bool cmGlobalGenerator::Compute()
#ifdef CMAKE_BUILD_WITH_CMAKE
// Iterate through all targets and set up automoc for those which have
// the AUTOMOC, AUTOUIC or AUTORCC property set
- AutogensType autogens;
- this->CreateQtAutoGeneratorsTargets(autogens);
+ std::vector<cmTarget const*> autogenTargets =
+ this->CreateQtAutoGeneratorsTargets();
#endif
unsigned int i;
@@ -1266,10 +1266,10 @@ bool cmGlobalGenerator::Compute()
this->InitGeneratorTargets();
#ifdef CMAKE_BUILD_WITH_CMAKE
- for (AutogensType::iterator it = autogens.begin(); it != autogens.end();
- ++it)
+ for (std::vector<cmTarget const*>::iterator it = autogenTargets.begin();
+ it != autogenTargets.end(); ++it)
{
- it->first.SetupAutoGenerateTarget(it->second);
+ cmQtAutoGenerators::SetupAutoGenerateTarget(*it);
}
#endif
@@ -1405,8 +1405,11 @@ bool cmGlobalGenerator::ComputeTargetDepends()
}
//----------------------------------------------------------------------------
-void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
+std::vector<const cmTarget*>
+cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
{
+ std::vector<const cmTarget*> autogenTargets;
+
#ifdef CMAKE_BUILD_WITH_CMAKE
for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
{
@@ -1458,13 +1461,11 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
->GetMakefile()->FindTarget(*ti, true);
cmQtAutoGenerators::InitializeAutogenTarget(
this->LocalGenerators[i], target);
- cmQtAutoGenerators autogen;
- autogens.push_back(std::make_pair(autogen, target));
+ autogenTargets.push_back(target);
}
}
-#else
- (void)autogens;
#endif
+ return autogenTargets;
}
//----------------------------------------------------------------------------
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 83cbc3f..f3dd713 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -41,7 +41,6 @@ class cmTarget;
class cmInstallTargetGenerator;
class cmInstallFilesGenerator;
class cmExportBuildFileGenerator;
-class cmQtAutoGenerators;
/** \class cmGlobalGenerator
* \brief Responsible for overseeing the generation process for the entire tree
@@ -385,9 +384,7 @@ protected:
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const;
- typedef std::vector<std::pair<cmQtAutoGenerators,
- cmTarget const*> > AutogensType;
- void CreateQtAutoGeneratorsTargets(AutogensType& autogens);
+ std::vector<cmTarget const*> CreateQtAutoGeneratorsTargets();
std::string SelectMakeProgram(const std::string& makeProgram,
const std::string& makeDefault = "") const;