mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-17 07:11:52 +08:00
file(GET_RUNTIME_DEPENDENCIES): Use cmSystemTools::GetLineFromStream()
Fixes: #22278
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#include <cmsys/RegularExpression.hxx>
|
#include <cmsys/RegularExpression.hxx>
|
||||||
|
|
||||||
#include "cmRuntimeDependencyArchive.h"
|
#include "cmRuntimeDependencyArchive.h"
|
||||||
|
#include "cmSystemTools.h"
|
||||||
#include "cmUVProcessChain.h"
|
#include "cmUVProcessChain.h"
|
||||||
|
|
||||||
cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool::
|
cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool::
|
||||||
@@ -42,8 +43,8 @@ bool cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool::GetFileInfo(
|
|||||||
|
|
||||||
std::string line;
|
std::string line;
|
||||||
static const cmsys::RegularExpression regex(
|
static const cmsys::RegularExpression regex(
|
||||||
"^\t*DLL Name: ([^\n]*\\.[Dd][Ll][Ll])\r$");
|
"^\t*DLL Name: ([^\n]*\\.[Dd][Ll][Ll])$");
|
||||||
while (std::getline(*process.OutputStream(), line)) {
|
while (cmSystemTools::GetLineFromStream(*process.OutputStream(), line)) {
|
||||||
cmsys::RegularExpressionMatch match;
|
cmsys::RegularExpressionMatch match;
|
||||||
if (regex.find(line.c_str(), match)) {
|
if (regex.find(line.c_str(), match)) {
|
||||||
needed.push_back(match.match(1));
|
needed.push_back(match.match(1));
|
||||||
|
Reference in New Issue
Block a user