浏览代码

GET_RUNTIME_DEPENDENCIES: Allow more whitespace before objdump's "DLL Name:"

LLVM's `llvm-objdump` has spaces before "DLL Name:" instead of tabs.
Adrian Pop 1 年之前
父节点
当前提交
c51f84b96a
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Modules/GetPrerequisites.cmake
  2. 1 1
      Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx

+ 1 - 1
Modules/GetPrerequisites.cmake

@@ -748,7 +748,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     set(gp_regex_cmp_count 1)
   elseif(gp_tool MATCHES "objdump(\\.exe)?$")
     set(gp_cmd_args "-p")
-    set(gp_regex "^\t*DLL Name: (.*\\.[Dd][Ll][Ll])${eol_char}$")
+    set(gp_regex "^[\t ]*DLL Name: (.*\\.[Dd][Ll][Ll])${eol_char}$")
     set(gp_regex_error "")
     set(gp_regex_fallback "")
     set(gp_regex_cmp_count 1)

+ 1 - 1
Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx

@@ -44,7 +44,7 @@ bool cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool::GetFileInfo(
 
   std::string line;
   static const cmsys::RegularExpression regex(
-    "^\t*DLL Name: ([^\n]*\\.[Dd][Ll][Ll])$");
+    "^[\t ]*DLL Name: ([^\n]*\\.[Dd][Ll][Ll])$");
   cmUVPipeIStream output(process.GetLoop(), process.OutputStream());
   while (cmSystemTools::GetLineFromStream(output, line)) {
     cmsys::RegularExpressionMatch match;