diff options
author | Brad King <brad.king@kitware.com> | 2016-02-08 17:50:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-02-08 18:08:11 (GMT) |
commit | 9b7d5871b86036da009119e14f54d161f2d44f24 (patch) | |
tree | ad8e06f9fe4d8f7e2b8c8f3a4f1adaea814ee3e5 /Source/cmLocalGenerator.cxx | |
parent | 6cbf6a51976c9092f84ef4a90d35fb6fd60f5898 (diff) | |
download | CMake-9b7d5871b86036da009119e14f54d161f2d44f24.zip CMake-9b7d5871b86036da009119e14f54d161f2d44f24.tar.gz CMake-9b7d5871b86036da009119e14f54d161f2d44f24.tar.bz2 |
Improve internal generator target structure lookup
In commit v3.5.0-rc1~272^2~6 (cmGlobalGenerator: Add FindGeneratorTarget
API, 2015-10-25) a lookup was implemented via linear search. Replace it
with an efficient data structure.
Suggested-by: Stephen Kelly <steveire@gmail.com>
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 1d17032..912be0c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -455,11 +455,13 @@ void cmLocalGenerator::GenerateInstallRules() void cmLocalGenerator::AddGeneratorTarget(cmGeneratorTarget* gt) { this->GeneratorTargets.push_back(gt); + this->GlobalGenerator->IndexGeneratorTarget(gt); } void cmLocalGenerator::AddImportedGeneratorTarget(cmGeneratorTarget* gt) { this->ImportedGeneratorTargets.push_back(gt); + this->GlobalGenerator->IndexGeneratorTarget(gt); } void cmLocalGenerator::AddOwnedImportedGeneratorTarget(cmGeneratorTarget* gt) |