cmFindPackageCommand: Move collectPathsForDebug() to anonymous namespace

This commit is contained in:
Alex Turbov
2022-06-27 08:21:49 +04:00
parent 6a95ab97e7
commit 865cfaa492

View File

@@ -56,6 +56,21 @@ struct StrverscmpOp
}
};
std::size_t collectPathsForDebug(std::string& buffer,
cmSearchPath const& searchPath,
std::size_t startIndex = 0)
{
const auto& paths = searchPath.GetPaths();
if (paths.empty()) {
buffer += " none\n";
return 0;
}
for (std::size_t i = startIndex; i < paths.size(); i++) {
buffer += " " + paths[i].Path + "\n";
}
return paths.size();
}
} // anonymous namespace
cmFindPackageCommand::PathLabel
@@ -1445,21 +1460,6 @@ void cmFindPackageCommand::AppendSuccessInformation()
}
}
inline std::size_t collectPathsForDebug(std::string& buffer,
cmSearchPath const& searchPath,
std::size_t startIndex = 0)
{
const auto& paths = searchPath.GetPaths();
if (paths.empty()) {
buffer += " none\n";
return 0;
}
for (std::size_t i = startIndex; i < paths.size(); i++) {
buffer += " " + paths[i].Path + "\n";
}
return paths.size();
}
void cmFindPackageCommand::ComputePrefixes()
{
this->FillPrefixesPackageRedirect();