diff options
author | Aaron Orenstein <aorenste@fb.com> | 2017-10-27 05:41:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-11-17 15:25:41 (GMT) |
commit | 4a6348dbbd35c51fabf01d517357129ed9480c85 (patch) | |
tree | b38bcaa7a1416dd90f16a54651ea61cf0cfa1f1c /Source/cmExtraCodeBlocksGenerator.cxx | |
parent | 1fe9e49bad0ad4f540ceda028106d9af89084946 (diff) | |
download | CMake-4a6348dbbd35c51fabf01d517357129ed9480c85.zip CMake-4a6348dbbd35c51fabf01d517357129ed9480c85.tar.gz CMake-4a6348dbbd35c51fabf01d517357129ed9480c85.tar.bz2 |
Performance: Improve efficiency of source file lookup in cmMakefile
This reintroduces the change from commit v3.10.0-rc1~69^2 (Performance:
Improve efficiency of source file lookup in cmMakefile, 2017-08-17) with
some corrections. The original was rolled back by commit
v3.10.0-rc1~52^2~1 (Revert "Performance: ...", 2017-09-25) due to
incompatibilities found. The rollback was followed-up by addition of a
test for the offending case, and this revision passes the test.
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 9c9b75b..76fc8f1 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -345,8 +345,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( all_files_map_t allFiles; std::vector<std::string> cFiles; - std::vector<std::string> const& srcExts = - this->GlobalGenerator->GetCMakeInstance()->GetSourceExtensions(); + auto cm = this->GlobalGenerator->GetCMakeInstance(); for (cmLocalGenerator* lg : lgs) { cmMakefile* makefile = lg->GetMakefile(); @@ -377,12 +376,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( std::string lang = s->GetLanguage(); if (lang == "C" || lang == "CXX") { std::string const& srcext = s->GetExtension(); - for (std::string const& ext : srcExts) { - if (srcext == ext) { - isCFile = true; - break; - } - } + isCFile = cm->IsSourceExtension(srcext); } std::string const& fullPath = s->GetFullPath(); |