mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 21:30:01 -05:00
Merge topic 'fix-find-performane-regression'
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:
@@ -243,12 +243,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
|
||||
@@ -261,7 +263,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