diff --git a/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx index 1effda053c..f14de5596b 100644 --- a/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx +++ b/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx @@ -8,6 +8,7 @@ #include #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));