diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-05 17:21:56 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-05 17:21:56 (GMT) |
commit | 1e757c318b38566aea1c9312a6fb5a3accd3966b (patch) | |
tree | 8dd218e68f1dc4e493ca5115c5c286a6a2691898 /Source | |
parent | 5fb730174dc5e0c07dfc7aec27e3d6e60c79e3d3 (diff) | |
download | CMake-1e757c318b38566aea1c9312a6fb5a3accd3966b.zip CMake-1e757c318b38566aea1c9312a6fb5a3accd3966b.tar.gz CMake-1e757c318b38566aea1c9312a6fb5a3accd3966b.tar.bz2 |
QtAutogen: Use a target type between loops.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 4a48b5d..53c859d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1413,8 +1413,8 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() { cmTargets& targets = this->LocalGenerators[i]->GetMakefile()->GetTargets(); - std::vector<std::string> targetNames; - targetNames.reserve(targets.size()); + std::vector<cmTarget*> filteredTargets; + filteredTargets.reserve(targets.size()); for(cmTargets::iterator ti = targets.begin(); ti != targets.end(); ++ti) { @@ -1450,13 +1450,12 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() } cmQtAutoGeneratorInitializer::InitializeAutogenSources(&ti->second); - targetNames.push_back(ti->second.GetName()); + filteredTargets.push_back(&ti->second); } - for(std::vector<std::string>::iterator ti = targetNames.begin(); - ti != targetNames.end(); ++ti) + for(std::vector<cmTarget*>::iterator ti = filteredTargets.begin(); + ti != filteredTargets.end(); ++ti) { - cmTarget* target = this->LocalGenerators[i] - ->GetMakefile()->FindTarget(*ti, true); + cmTarget* target = *ti; cmQtAutoGeneratorInitializer::InitializeAutogenTarget( this->LocalGenerators[i], target); autogenTargets.push_back(target); |