mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
Performance: Add an index to Change cmLocalGenerator::GeneratorTargets.
Add an index to Change cmLocalGenerator::GeneratorTargets for faster lookup by name. Also changed a bunch of uses of cmLocalGenerator::GetGeneratorTargets() to take const references instead of copying the vector. Represent generator targets as a map (name -> target) to make name lookups more efficient instead of looping through the entire vector to find the desired one.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "cmOutputConverter.h"
|
||||
#include "cmPolicies.h"
|
||||
#include "cmStateSnapshot.h"
|
||||
#include "cm_unordered_map.hxx"
|
||||
#include "cmake.h"
|
||||
|
||||
class cmComputeLinkInformation;
|
||||
@@ -353,8 +354,11 @@ protected:
|
||||
std::string::size_type ObjectPathMax;
|
||||
std::set<std::string> ObjectMaxPathViolations;
|
||||
|
||||
std::set<cmGeneratorTarget const*> WarnCMP0063;
|
||||
typedef CM_UNORDERED_MAP<std::string, cmGeneratorTarget*> GeneratorTargetMap;
|
||||
GeneratorTargetMap GeneratorTargetSearchIndex;
|
||||
std::vector<cmGeneratorTarget*> GeneratorTargets;
|
||||
|
||||
std::set<cmGeneratorTarget const*> WarnCMP0063;
|
||||
std::vector<cmGeneratorTarget*> ImportedGeneratorTargets;
|
||||
std::vector<cmGeneratorTarget*> OwnedImportedGeneratorTargets;
|
||||
std::map<std::string, std::string> AliasTargets;
|
||||
|
||||
Reference in New Issue
Block a user