mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 22:30:13 -06:00
Merge topic 'fix-find-performane-regression' into release-4.0
bb3a348def find_package: Fix performance regression in 4.0.0 release
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10731
This commit is contained in:
@@ -240,12 +240,14 @@ public:
|
||||
for (auto i = 0ul; i < directoryLister.GetNumberOfFiles(); ++i) {
|
||||
char const* const fname = directoryLister.GetFile(i);
|
||||
// Skip entries to ignore or that aren't directories.
|
||||
if (isDirentryToIgnore(fname) || !directoryLister.FileIsDirectory(i)) {
|
||||
if (isDirentryToIgnore(fname)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!this->Names) {
|
||||
this->Matches.emplace_back(fname);
|
||||
if (directoryLister.FileIsDirectory(i)) {
|
||||
this->Matches.emplace_back(fname);
|
||||
}
|
||||
} else {
|
||||
for (auto const& n : *this->Names) {
|
||||
// NOTE Customization point for
|
||||
@@ -258,7 +260,9 @@ public:
|
||||
: cmsysString_strncasecmp(fname, name.c_str(),
|
||||
name.length())) == 0);
|
||||
if (equal) {
|
||||
this->Matches.emplace_back(fname);
|
||||
if (directoryLister.FileIsDirectory(i)) {
|
||||
this->Matches.emplace_back(fname);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user