From 3bb74534360766701ec0c8bd1160594f3f075dd9 Mon Sep 17 00:00:00 2001 From: Jon Chronopoulos Date: Sun, 11 Aug 2019 19:46:29 +1000 Subject: GetPrerequisites: match ldd output on Solaris Solaris output is the following: ``` $ ldd /lib/libxml2.so libz.so.1 => /lib/libz.so.1 libm.so.2 => /lib/libm.so.2 libc.so.1 => /lib/libc.so.1 ``` While on Linux ``` $ ldd /usr/lib/libxml2.so linux-vdso.so.1 (0x00007ffe02bbe000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f03ab852000) libicuuc.so.64 => /usr/lib/libicuuc.so.64 (0x00007f03ab67a000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f03ab463000) liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f03ab23d000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f03ab0f7000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f03aaf34000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f03ab9fd000) libicudata.so.64 => /usr/lib/libicudata.so.64 (0x00007f03a94ee000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f03a94cd000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f03a92e5000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f03a92cb000) ``` --- Modules/GetPrerequisites.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 2beea00..57ae446 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -729,7 +729,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa if(gp_tool MATCHES "ldd$") set(gp_cmd_args "") - set(gp_regex "^[\t ]*[^\t ]+ => ([^\t\(]+) .*${eol_char}$") + set(gp_regex "^[\t ]*[^\t ]+ =>[\t ]+([^\t\(]+)( \(.+\))?${eol_char}$") set(gp_regex_error "not found${eol_char}$") set(gp_regex_fallback "^[\t ]*([^\t ]+) => ([^\t ]+).*${eol_char}$") set(gp_regex_cmp_count 1) -- cgit v0.12