diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-07-10 15:03:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-07-13 12:32:02 (GMT) |
commit | d9af90504f7d2a0ac90eeedf12148647b3feb27b (patch) | |
tree | 4577e3077c3cfabd6318affe09b7c394c811e0b2 /Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES | |
parent | c51400033ce77b100f222b309cf893bd814ffc37 (diff) | |
download | CMake-d9af90504f7d2a0ac90eeedf12148647b3feb27b.zip CMake-d9af90504f7d2a0ac90eeedf12148647b3feb27b.tar.gz CMake-d9af90504f7d2a0ac90eeedf12148647b3feb27b.tar.bz2 |
Tests: Update file(G_R_D) test to make system library optional
Since the system library may not exist on the filesystem on macOS
11, skip it if it doesn't exist.
Diffstat (limited to 'Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES')
-rw-r--r-- | Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake index 7f68398..e6f2623 100644 --- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake @@ -16,7 +16,15 @@ in file: endif() endfunction() -set(_check +function(set_with_libsystem var) + set(_tmp "${ARGN}") + if(EXISTS "/usr/lib/libSystem.B.dylib") + list(APPEND _tmp [[/usr/lib/libSystem\.B\.dylib]]) + endif() + set("${var}" "${_tmp}" PARENT_SCOPE) +endfunction() + +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/bin/../lib/executable_path/libexecutable_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/bin/../lib/rpath_executable_path/librpath_executable_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] @@ -24,7 +32,6 @@ set(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps1.txt "^${_check}$") @@ -37,13 +44,12 @@ set(_check ) check_contents(deps/udeps1.txt "^${_check}$") -set(_check +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps2.txt "^${_check}$") @@ -60,13 +66,12 @@ set(_check ) check_contents(deps/udeps2.txt "^${_check}$") -set(_check +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps3.txt "^${_check}$") @@ -83,7 +88,7 @@ set(_check ) check_contents(deps/udeps3.txt "^${_check}$") -set(_check +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/bin/../lib/executable_path/libexecutable_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/bin/../lib/rpath_executable_path/librpath_executable_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] @@ -91,7 +96,6 @@ set(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps4.txt "^${_check}$") @@ -104,14 +108,13 @@ set(_check ) check_contents(deps/udeps4.txt "^${_check}$") -set(_check +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/bundle_executable/bin/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps5.txt "^${_check}$") @@ -125,14 +128,13 @@ set(_check ) check_contents(deps/udeps5.txt "^${_check}$") -set(_check +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/bundle_executable/bin/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps6.txt "^${_check}$") |