1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

file(GET_RUNTIME_DEPENDENCIES): Use cmSystemTools::GetLineFromStream()

Fixes: #22278
This commit is contained in:
Kyle Edwards
2021-06-07 15:35:12 -04:00
parent 8732749ef4
commit 100d3cb392

View File

@@ -8,6 +8,7 @@
#include <cmsys/RegularExpression.hxx>
#include "cmRuntimeDependencyArchive.h"
#include "cmSystemTools.h"
#include "cmUVProcessChain.h"
cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool::
@@ -42,8 +43,8 @@ bool cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool::GetFileInfo(
std::string line;
static const cmsys::RegularExpression regex(
"^\t*DLL Name: ([^\n]*\\.[Dd][Ll][Ll])\r$");
while (std::getline(*process.OutputStream(), line)) {
"^\t*DLL Name: ([^\n]*\\.[Dd][Ll][Ll])$");
while (cmSystemTools::GetLineFromStream(*process.OutputStream(), line)) {
cmsys::RegularExpressionMatch match;
if (regex.find(line.c_str(), match)) {
needed.push_back(match.match(1));