diff options
author | Jon Chronopoulos <patches@crondog.com> | 2019-08-11 09:46:29 (GMT) |
---|---|---|
committer | Jon Chronopoulos <patches@crondog.com> | 2019-08-21 07:25:28 (GMT) |
commit | 3bb74534360766701ec0c8bd1160594f3f075dd9 (patch) | |
tree | 5bfc9034ae12f119f58f593b7388a2a60fdc4378 /Modules/GetPrerequisites.cmake | |
parent | 2a5d077a89ea3ef08409e4d3e043ae78c9d8132d (diff) | |
download | CMake-3bb74534360766701ec0c8bd1160594f3f075dd9.zip CMake-3bb74534360766701ec0c8bd1160594f3f075dd9.tar.gz CMake-3bb74534360766701ec0c8bd1160594f3f075dd9.tar.bz2 |
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)
```
Diffstat (limited to 'Modules/GetPrerequisites.cmake')
-rw-r--r-- | Modules/GetPrerequisites.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
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) |