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/cmAuxSourceDirectoryCommand.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/cmAuxSourceDirectoryCommand.cxx')
-rw-r--r-- | Source/cmAuxSourceDirectoryCommand.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index 847a416..fcdc632 100644 --- a/Source/cmAuxSourceDirectoryCommand.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -54,10 +54,8 @@ bool cmAuxSourceDirectoryCommand::InitialPass( std::string ext = file.substr(dotpos + 1); std::string base = file.substr(0, dotpos); // Process only source files - std::vector<std::string> const& srcExts = - this->Makefile->GetCMakeInstance()->GetSourceExtensions(); - if (!base.empty() && - std::find(srcExts.begin(), srcExts.end(), ext) != srcExts.end()) { + auto cm = this->Makefile->GetCMakeInstance(); + if (!base.empty() && cm->IsSourceExtension(ext)) { std::string fullname = templateDirectory; fullname += "/"; fullname += file; |