cmUVProcessChain: Return output and error streams as file descriptors

This commit is contained in:
Kyle Edwards
2023-06-09 10:02:47 -04:00
parent ec81d40be4
commit b8fd273ed7
9 changed files with 68 additions and 89 deletions

View File

@@ -14,6 +14,7 @@
#include "cmRuntimeDependencyArchive.h"
#include "cmSystemTools.h"
#include "cmUVProcessChain.h"
#include "cmUVStream.h"
cmLDConfigLDConfigTool::cmLDConfigLDConfigTool(
cmRuntimeDependencyArchive* archive)
@@ -50,7 +51,8 @@ bool cmLDConfigLDConfigTool::GetLDConfigPaths(std::vector<std::string>& paths)
std::string line;
static const cmsys::RegularExpression regex("^([^\t:]*):");
while (std::getline(*process.OutputStream(), line)) {
cmUVPipeIStream output(process.GetLoop(), process.OutputStream());
while (std::getline(output, line)) {
cmsys::RegularExpressionMatch match;
if (regex.find(line.c_str(), match)) {
paths.push_back(match.match(1));