diff options
author | Brad King <brad.king@kitware.com> | 2020-06-16 14:50:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-16 15:17:55 (GMT) |
commit | 248d0570c9016392feb841ffce6ac77e194aefe8 (patch) | |
tree | 2a43f5ef582fa6b2af06015b070fb9402214e455 /Tests/RunCMake | |
parent | 3f110a08571e3a506184e6b8a8e9622317435912 (diff) | |
download | CMake-248d0570c9016392feb841ffce6ac77e194aefe8.zip CMake-248d0570c9016392feb841ffce6ac77e194aefe8.tar.gz CMake-248d0570c9016392feb841ffce6ac77e194aefe8.tar.bz2 |
Tests: Factor out RunCMake.file-GET_RUNTIME_DEPENDENCIES test
Move the `file(GET_RUNTIME_DEPENDENCIES)` cases out of `RunCMake.install`.
Diffstat (limited to 'Tests/RunCMake')
69 files changed, 316 insertions, 296 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 58a859f..866e7c0 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -522,11 +522,15 @@ else() set(NO_NAMELINK 0) endif() -add_RunCMake_test(install -DNO_NAMELINK=${NO_NAMELINK} -DCYGWIN=${CYGWIN} -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} +add_RunCMake_test(install -DNO_NAMELINK=${NO_NAMELINK} -DCYGWIN=${CYGWIN} -DCMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN=${CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN} -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DCMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG=${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG} -DCMAKE_EXECUTABLE_FORMAT=${CMAKE_EXECUTABLE_FORMAT} + ) + +add_RunCMake_test(file-GET_RUNTIME_DEPENDENCIES + -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} -DCMake_INSTALL_NAME_TOOL_BUG=${CMake_INSTALL_NAME_TOOL_BUG} ) diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/CMakeLists.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/CMakeLists.txt new file mode 100644 index 0000000..2632ffa --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.16) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake new file mode 100644 index 0000000..da5069c --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake @@ -0,0 +1,55 @@ +cmake_minimum_required(VERSION 3.16) +include(RunCMake) + +# Function to build and install a project. +function(run_install_test case) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + run_cmake(${case}) + run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config Debug) + # Check "all" components. + set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-all) + run_cmake_command(${case}-all ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -P cmake_install.cmake) +endfunction() + +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + if(NOT CMake_INSTALL_NAME_TOOL_BUG) + run_install_test(file-GET_RUNTIME_DEPENDENCIES-macos) + run_install_test(file-GET_RUNTIME_DEPENDENCIES-macos-unresolved) + run_install_test(file-GET_RUNTIME_DEPENDENCIES-macos-conflict) + run_install_test(file-GET_RUNTIME_DEPENDENCIES-macos-notfile) + endif() + run_cmake(file-GET_RUNTIME_DEPENDENCIES-project) + run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs1) + run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs2) +elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + run_install_test(file-GET_RUNTIME_DEPENDENCIES-windows) + run_install_test(file-GET_RUNTIME_DEPENDENCIES-windows-unresolved) + run_install_test(file-GET_RUNTIME_DEPENDENCIES-windows-conflict) + run_install_test(file-GET_RUNTIME_DEPENDENCIES-windows-notfile) + run_cmake(file-GET_RUNTIME_DEPENDENCIES-project) + run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs1) + run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs2) +elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + if(DEFINED ENV{LDFLAGS}) + # Some setups prebake disable-new-dtags into LDFLAGS + string(REPLACE "-Wl,--disable-new-dtags" "" new_ldflags "$ENV{LDFLAGS}") + set(ENV{LDFLAGS} "${new_ldflags}") + endif() + + if(NOT CMAKE_C_COMPILER_ID MATCHES "^XL") + run_install_test(file-GET_RUNTIME_DEPENDENCIES-linux) + endif() + run_install_test(file-GET_RUNTIME_DEPENDENCIES-linux-unresolved) + run_install_test(file-GET_RUNTIME_DEPENDENCIES-linux-conflict) + run_install_test(file-GET_RUNTIME_DEPENDENCIES-linux-notfile) + run_cmake(file-GET_RUNTIME_DEPENDENCIES-project) + run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs1) + run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs2) +else() + run_cmake(file-GET_RUNTIME_DEPENDENCIES-unsupported) +endif() + +run_install_test(file-GET_RUNTIME_DEPENDENCIES-variable-propagation) diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs1-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs1-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs1-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs1-result.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs1-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs1-stderr.txt index b66d1fe..b66d1fe 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs1-stderr.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs1-stderr.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs1.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs1.cmake index f3b8ce4..f3b8ce4 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs1.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs1.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs2-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs2-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs2-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs2-result.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs2-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs2-stderr.txt index 50fa81f..50fa81f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs2-stderr.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs2-stderr.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs2.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs2.cmake index ac6af85..ac6af85 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-badargs2.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-badargs2.cmake diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-all-check.cmake new file mode 100644 index 0000000..ab482f2 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-all-check.cmake @@ -0,0 +1,44 @@ +function(check_contents filename contents_regex) + if(EXISTS "${CMAKE_INSTALL_PREFIX}/${filename}") + file(READ "${CMAKE_INSTALL_PREFIX}/${filename}" contents) + if(NOT contents MATCHES "${contents_regex}") + string(APPEND RunCMake_TEST_FAILED "File contents: + ${contents} +do not match what we expected: + ${contents_regex} +in file: + ${CMAKE_INSTALL_PREFIX}/${filename}\n") + set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE) + endif() + else() + string(APPEND RunCMake_TEST_FAILED "File ${CMAKE_INSTALL_PREFIX}/${filename} does not exist") + set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE) + endif() +endfunction() + +set(_check + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/libtest_rpath\.so]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/libtest_runpath\.so]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath/librpath\.so]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_parent/librpath_parent\.so]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search/librpath_search\.so]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath/librunpath\.so]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search/librunpath_search\.so]] + ) +check_contents(deps/deps1.txt "^${_check}$") +check_contents(deps/deps2.txt "^${_check}$") +check_contents(deps/deps3.txt "^${_check}$") +set(_check + [[librpath_unresolved\.so]] + [[librunpath_parent_unresolved\.so]] + [[librunpath_unresolved\.so]] + ) +check_contents(deps/udeps1.txt "^${_check}$") +check_contents(deps/udeps2.txt "^${_check}$") +check_contents(deps/udeps3.txt "^${_check}$") +set(_check + "^libconflict\\.so:[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/conflict/libconflict\\.so;[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/conflict2/libconflict\\.so\n$" + ) +check_contents(deps/cdeps1.txt "${_check}") +check_contents(deps/cdeps2.txt "${_check}") +check_contents(deps/cdeps3.txt "${_check}") diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-all-stderr.txt index 123ae48..7ba3033 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-all-stderr.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-all-stderr.txt @@ -2,7 +2,7 @@ Dependency librpath_search_postexcluded\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search_postexcluded +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search_postexcluded See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -12,7 +12,7 @@ Call Stack \(most recent call first\): Dependency librpath_search\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -22,7 +22,7 @@ Call Stack \(most recent call first\): Dependency librunpath_search_postexcluded\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search_postexcluded +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search_postexcluded See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -32,7 +32,7 @@ Call Stack \(most recent call first\): Dependency librunpath_search\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -42,7 +42,7 @@ Call Stack \(most recent call first\): Dependency librpath_search_postexcluded\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search_postexcluded +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search_postexcluded See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -52,7 +52,7 @@ Call Stack \(most recent call first\): Dependency librpath_search\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -62,7 +62,7 @@ Call Stack \(most recent call first\): Dependency librunpath_search_postexcluded\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search_postexcluded +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search_postexcluded See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -72,7 +72,7 @@ Call Stack \(most recent call first\): Dependency librunpath_search\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -82,7 +82,7 @@ Call Stack \(most recent call first\): Dependency librpath_search_postexcluded\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search_postexcluded +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search_postexcluded See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -92,7 +92,7 @@ Call Stack \(most recent call first\): Dependency librpath_search\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -102,7 +102,7 @@ Call Stack \(most recent call first\): Dependency librunpath_search_postexcluded\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search_postexcluded +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search_postexcluded See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): @@ -112,7 +112,7 @@ Call Stack \(most recent call first\): Dependency librunpath_search\.so found in search directory: [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search See file\(GET_RUNTIME_DEPENDENCIES\) documentation for more information\. Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-all-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-all-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-all-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-all-result.txt diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-all-stderr.txt new file mode 100644 index 0000000..37f283a --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-all-stderr.txt @@ -0,0 +1,7 @@ +^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): + file Multiple conflicting paths found for librpath\.so: + + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-build/root-all/lib/rpath1/librpath\.so + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-build/root-all/lib/rpath2/librpath\.so$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake index f719499..f719499 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-all-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-all-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-all-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-all-result.txt diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-all-stderr.txt new file mode 100644 index 0000000..4e56787 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-all-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): + file Failed to run objdump on: + + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-build/root-all/bin/\.\./lib/libtest\.so$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-notfile.cmake index 6567438..6567438 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-notfile.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved-all-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved-all-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved-all-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved-all-result.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved-all-stderr.txt index eaca512..eaca512 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved-all-stderr.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved-all-stderr.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved.cmake index 3efa305..3efa305 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux-unresolved.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux.cmake index bd0f9f1..bd0f9f1 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux/topexe.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux/topexe.c index d196afe..d196afe 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux/topexe.c +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux/topexe.c diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux/toplib.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux/toplib.c index 040e591..040e591 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux/toplib.c +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-linux/toplib.c diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-all-check.cmake new file mode 100644 index 0000000..d2f79ed --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-all-check.cmake @@ -0,0 +1,157 @@ +function(check_contents filename contents_regex) + if(EXISTS "${CMAKE_INSTALL_PREFIX}/${filename}") + file(READ "${CMAKE_INSTALL_PREFIX}/${filename}" contents) + if(NOT contents MATCHES "${contents_regex}") + string(APPEND RunCMake_TEST_FAILED "File contents: + ${contents} +do not match what we expected: + ${contents_regex} +in file: + ${CMAKE_INSTALL_PREFIX}/${filename}\n") + set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE) + endif() + else() + string(APPEND RunCMake_TEST_FAILED "File ${CMAKE_INSTALL_PREFIX}/${filename} does not exist") + set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE) + endif() +endfunction() + +set(_check + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/bin/../lib/executable_path/libexecutable_path\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/bin/../lib/rpath_executable_path/librpath_executable_path\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/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}$") + +set(_check + [[@executable_path/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] + [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] + [[@rpath/librpath_executable_path_bundle\.dylib]] + [[@rpath/librpath_loader_path_unresolved\.dylib]] + [[@rpath/librpath_unresolved\.dylib]] + ) +check_contents(deps/udeps1.txt "^${_check}$") + +set(_check + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/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}$") + +set(_check + [[@executable_path/../lib/executable_path/libexecutable_path\.dylib]] + [[@executable_path/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] + [[@executable_path/../lib/executable_path_postexcluded/libexecutable_path_postexcluded\.dylib]] + [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] + [[@rpath/librpath_executable_path\.dylib]] + [[@rpath/librpath_executable_path_bundle\.dylib]] + [[@rpath/librpath_executable_path_postexcluded\.dylib]] + [[@rpath/librpath_loader_path_unresolved\.dylib]] + [[@rpath/librpath_unresolved\.dylib]] + ) +check_contents(deps/udeps2.txt "^${_check}$") + +set(_check + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/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}$") + +set(_check + [[@executable_path/../lib/executable_path/libexecutable_path\.dylib]] + [[@executable_path/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] + [[@executable_path/../lib/executable_path_postexcluded/libexecutable_path_postexcluded\.dylib]] + [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] + [[@rpath/librpath_executable_path\.dylib]] + [[@rpath/librpath_executable_path_bundle\.dylib]] + [[@rpath/librpath_executable_path_postexcluded\.dylib]] + [[@rpath/librpath_loader_path_unresolved\.dylib]] + [[@rpath/librpath_unresolved\.dylib]] + ) +check_contents(deps/udeps3.txt "^${_check}$") + +set(_check + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/bin/../lib/executable_path/libexecutable_path\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/bin/../lib/rpath_executable_path/librpath_executable_path\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/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}$") + +set(_check + [[@executable_path/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] + [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] + [[@rpath/librpath_executable_path_bundle\.dylib]] + [[@rpath/librpath_loader_path_unresolved\.dylib]] + [[@rpath/librpath_unresolved\.dylib]] + ) +check_contents(deps/udeps4.txt "^${_check}$") + +set(_check + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/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/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/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}$") + +set(_check + [[@executable_path/../lib/executable_path/libexecutable_path\.dylib]] + [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] + [[@rpath/librpath_executable_path\.dylib]] + [[@rpath/librpath_executable_path_bundle\.dylib]] + [[@rpath/librpath_loader_path_unresolved\.dylib]] + [[@rpath/librpath_unresolved\.dylib]] + ) +check_contents(deps/udeps5.txt "^${_check}$") + +set(_check + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/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/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] + [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/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}$") + +set(_check + [[@executable_path/../lib/executable_path/libexecutable_path\.dylib]] + [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] + [[@rpath/librpath_executable_path\.dylib]] + [[@rpath/librpath_executable_path_bundle\.dylib]] + [[@rpath/librpath_loader_path_unresolved\.dylib]] + [[@rpath/librpath_unresolved\.dylib]] + ) +check_contents(deps/udeps6.txt "^${_check}$") + +set(_check + "^libconflict\\.dylib:[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/conflict/libconflict\\.dylib;[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/conflict2/libconflict\\.dylib\n$" + ) +check_contents(deps/cdeps1.txt "${_check}") +check_contents(deps/cdeps2.txt "${_check}") +check_contents(deps/cdeps3.txt "${_check}") +check_contents(deps/cdeps4.txt "${_check}") +check_contents(deps/cdeps5.txt "${_check}") +check_contents(deps/cdeps6.txt "${_check}") diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-all-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-all-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-all-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-all-result.txt diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-all-stderr.txt new file mode 100644 index 0000000..7f36f71 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-all-stderr.txt @@ -0,0 +1,7 @@ +^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): + file Multiple conflicting paths found for librpath\.dylib: + + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-build/root-all/lib/rpath1/librpath\.dylib + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-build/root-all/lib/rpath2/librpath\.dylib$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-conflict.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-conflict.cmake index a8446fe..a8446fe 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-conflict.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-conflict.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-all-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-all-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-all-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-all-result.txt diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-all-stderr.txt new file mode 100644 index 0000000..1aac009 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-all-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): + file Failed to run otool on: + + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-build/root-all/bin/\.\./lib/libtest\.dylib$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-notfile.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-notfile.cmake index 3e4c434..3e4c434 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-notfile.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-notfile.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved-all-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved-all-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved-all-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved-all-result.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved-all-stderr.txt index 01762b4..01762b4 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved-all-stderr.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved-all-stderr.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved.cmake index c9b6c95..c9b6c95 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos-unresolved.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos.cmake index 6db05b3..6db05b3 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos/topexe.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos/topexe.c index 20c6087..20c6087 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos/topexe.c +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos/topexe.c diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos/toplib.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos/toplib.c index cff1bff..cff1bff 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos/toplib.c +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-macos/toplib.c diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-project-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-project-stderr.txt index d506645..d506645 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-project-stderr.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-project-stderr.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-project.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-project.cmake index 842d7ab..842d7ab 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-project.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-project.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-unsupported-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-unsupported-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-unsupported-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-unsupported-result.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-unsupported-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-unsupported-stderr.txt index 3db835c..3db835c 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-unsupported-stderr.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-unsupported-stderr.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-unsupported.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-unsupported.cmake index b91eefe..b91eefe 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-unsupported.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-unsupported.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt index 591a5e7..591a5e7 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt index 591a5e7..591a5e7 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake index 07bbc5e..07bbc5e 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-all-check.cmake index c120ce4..b1ba6df 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-all-check.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-all-check.cmake @@ -17,9 +17,9 @@ in file: endfunction() set(_check - [=[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-build/root-all/bin/\.conflict/\.\./(lib)?libdir\.dll]=] - [=[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-build/root-all/bin/\.search/(lib)?search\.dll]=] - [=[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-build/root-all/bin/(lib)?testlib\.dll]=] + [=[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-build/root-all/bin/\.conflict/\.\./(lib)?libdir\.dll]=] + [=[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-build/root-all/bin/\.search/(lib)?search\.dll]=] + [=[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-build/root-all/bin/(lib)?testlib\.dll]=] ) check_contents(deps/deps1.txt "^${_check}$") check_contents(deps/deps2.txt "^${_check}$") @@ -31,7 +31,7 @@ check_contents(deps/udeps1.txt "^${_check}$") check_contents(deps/udeps2.txt "^${_check}$") check_contents(deps/udeps3.txt "^${_check}$") set(_check - "^(lib)?conflict\\.dll:[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-build/root-all/bin/\\.conflict/(lib)?conflict\\.dll;[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-build/root-all/bin/(lib)?conflict\\.dll\n$" + "^(lib)?conflict\\.dll:[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-build/root-all/bin/\\.conflict/(lib)?conflict\\.dll;[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-build/root-all/bin/(lib)?conflict\\.dll\n$" ) check_contents(deps/cdeps1.txt "${_check}") check_contents(deps/cdeps2.txt "${_check}") diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-all-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-all-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-all-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-all-result.txt diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-all-stderr.txt new file mode 100644 index 0000000..a9ca6d0 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-all-stderr.txt @@ -0,0 +1,7 @@ +^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): + file Multiple conflicting paths found for (lib)?path\.dll: + + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-build/root-all/lib/test1/(lib)?path\.dll + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-build/root-all/lib/test2/(lib)?path\.dll$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-conflict.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-conflict.cmake index d413443..d413443 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-conflict.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-conflict.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-all-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-all-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-all-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-all-result.txt diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-all-stderr.txt new file mode 100644 index 0000000..432ac32 --- /dev/null +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-all-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): + file Failed to run (dumpbin|objdump) on: + + [^ +]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-build/root-all/bin/(lib)?test\.dll$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-notfile.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-notfile.cmake index 6665a3b..6665a3b 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-notfile.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-notfile.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved-all-result.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved-all-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved-all-result.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved-all-result.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved-all-stderr.txt b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved-all-stderr.txt index a20654c..a20654c 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved-all-stderr.txt +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved-all-stderr.txt diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved.cmake index 4cc74c7..4cc74c7 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows-unresolved.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows.cmake index 19288d8..19288d8 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows.cmake diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows/topexe.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows/topexe.c index 713b8eb..713b8eb 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows/topexe.c +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows/topexe.c diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows/toplib.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows/toplib.c index 6997175..6997175 100644 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows/toplib.c +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/file-GET_RUNTIME_DEPENDENCIES-windows/toplib.c diff --git a/Tests/RunCMake/install/CMakeLists.txt b/Tests/RunCMake/install/CMakeLists.txt index c7e99ad..6dd8cdf 100644 --- a/Tests/RunCMake/install/CMakeLists.txt +++ b/Tests/RunCMake/install/CMakeLists.txt @@ -1,6 +1,3 @@ cmake_minimum_required(VERSION 3.4) -if(RunCMake_TEST MATCHES "^file-GET_RUNTIME_DEPENDENCIES") - cmake_policy(SET CMP0087 NEW) -endif() project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index c50e552..d83a07c 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -155,46 +155,7 @@ run_install_test(FILES-PERMISSIONS) run_install_test(TARGETS-RPATH) run_install_test(InstallRequiredSystemLibraries) -if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") - if(NOT CMake_INSTALL_NAME_TOOL_BUG) - run_install_test(file-GET_RUNTIME_DEPENDENCIES-macos) - run_install_test(file-GET_RUNTIME_DEPENDENCIES-macos-unresolved) - run_install_test(file-GET_RUNTIME_DEPENDENCIES-macos-conflict) - run_install_test(file-GET_RUNTIME_DEPENDENCIES-macos-notfile) - endif() - run_cmake(file-GET_RUNTIME_DEPENDENCIES-project) - run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs1) - run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs2) -elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") - run_install_test(file-GET_RUNTIME_DEPENDENCIES-windows) - run_install_test(file-GET_RUNTIME_DEPENDENCIES-windows-unresolved) - run_install_test(file-GET_RUNTIME_DEPENDENCIES-windows-conflict) - run_install_test(file-GET_RUNTIME_DEPENDENCIES-windows-notfile) - run_cmake(file-GET_RUNTIME_DEPENDENCIES-project) - run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs1) - run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs2) -elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") - if(DEFINED ENV{LDFLAGS}) - # Some setups prebake disable-new-dtags into LDFLAGS - string(REPLACE "-Wl,--disable-new-dtags" "" new_ldflags "$ENV{LDFLAGS}") - set(ENV{LDFLAGS} "${new_ldflags}") - endif() - - if(NOT CMAKE_C_COMPILER_ID MATCHES "^XL") - run_install_test(file-GET_RUNTIME_DEPENDENCIES-linux) - endif() - run_install_test(file-GET_RUNTIME_DEPENDENCIES-linux-unresolved) - run_install_test(file-GET_RUNTIME_DEPENDENCIES-linux-conflict) - run_install_test(file-GET_RUNTIME_DEPENDENCIES-linux-notfile) - run_cmake(file-GET_RUNTIME_DEPENDENCIES-project) - run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs1) - run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs2) -else() - run_cmake(file-GET_RUNTIME_DEPENDENCIES-unsupported) -endif() - set(run_install_test_components 1) -run_install_test(file-GET_RUNTIME_DEPENDENCIES-variable-propagation) run_install_test(FILES-EXCLUDE_FROM_ALL) run_install_test(TARGETS-EXCLUDE_FROM_ALL) run_install_test(TARGETS-NAMELINK_COMPONENT) diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-all-check.cmake b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-all-check.cmake deleted file mode 100644 index ab630f0..0000000 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-all-check.cmake +++ /dev/null @@ -1,44 +0,0 @@ -function(check_contents filename contents_regex) - if(EXISTS "${CMAKE_INSTALL_PREFIX}/${filename}") - file(READ "${CMAKE_INSTALL_PREFIX}/${filename}" contents) - if(NOT contents MATCHES "${contents_regex}") - string(APPEND RunCMake_TEST_FAILED "File contents: - ${contents} -do not match what we expected: - ${contents_regex} -in file: - ${CMAKE_INSTALL_PREFIX}/${filename}\n") - set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE) - endif() - else() - string(APPEND RunCMake_TEST_FAILED "File ${CMAKE_INSTALL_PREFIX}/${filename} does not exist") - set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE) - endif() -endfunction() - -set(_check - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/libtest_rpath\.so]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/libtest_runpath\.so]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath/librpath\.so]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_parent/librpath_parent\.so]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/rpath_search/librpath_search\.so]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath/librunpath\.so]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/runpath_search/librunpath_search\.so]] - ) -check_contents(deps/deps1.txt "^${_check}$") -check_contents(deps/deps2.txt "^${_check}$") -check_contents(deps/deps3.txt "^${_check}$") -set(_check - [[librpath_unresolved\.so]] - [[librunpath_parent_unresolved\.so]] - [[librunpath_unresolved\.so]] - ) -check_contents(deps/udeps1.txt "^${_check}$") -check_contents(deps/udeps2.txt "^${_check}$") -check_contents(deps/udeps3.txt "^${_check}$") -set(_check - "^libconflict\\.so:[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/conflict/libconflict\\.so;[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-build/root-all/lib/conflict2/libconflict\\.so\n$" - ) -check_contents(deps/cdeps1.txt "${_check}") -check_contents(deps/cdeps2.txt "${_check}") -check_contents(deps/cdeps3.txt "${_check}") diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-all-stderr.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-all-stderr.txt deleted file mode 100644 index 1692348..0000000 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-all-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): - file Multiple conflicting paths found for librpath\.so: - - [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-build/root-all/lib/rpath1/librpath\.so - [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict-build/root-all/lib/rpath2/librpath\.so$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-all-stderr.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-all-stderr.txt deleted file mode 100644 index 83a87c9..0000000 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-all-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): - file Failed to run objdump on: - - [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile-build/root-all/bin/\.\./lib/libtest\.so$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-all-check.cmake b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-all-check.cmake deleted file mode 100644 index 4d6dde1..0000000 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-all-check.cmake +++ /dev/null @@ -1,157 +0,0 @@ -function(check_contents filename contents_regex) - if(EXISTS "${CMAKE_INSTALL_PREFIX}/${filename}") - file(READ "${CMAKE_INSTALL_PREFIX}/${filename}" contents) - if(NOT contents MATCHES "${contents_regex}") - string(APPEND RunCMake_TEST_FAILED "File contents: - ${contents} -do not match what we expected: - ${contents_regex} -in file: - ${CMAKE_INSTALL_PREFIX}/${filename}\n") - set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE) - endif() - else() - string(APPEND RunCMake_TEST_FAILED "File ${CMAKE_INSTALL_PREFIX}/${filename} does not exist") - set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE) - endif() -endfunction() - -set(_check - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/bin/../lib/executable_path/libexecutable_path\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/bin/../lib/rpath_executable_path/librpath_executable_path\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] - [[[^;]*/Tests/RunCMake/install/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}$") - -set(_check - [[@executable_path/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] - [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] - [[@rpath/librpath_executable_path_bundle\.dylib]] - [[@rpath/librpath_loader_path_unresolved\.dylib]] - [[@rpath/librpath_unresolved\.dylib]] - ) -check_contents(deps/udeps1.txt "^${_check}$") - -set(_check - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] - [[[^;]*/Tests/RunCMake/install/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}$") - -set(_check - [[@executable_path/../lib/executable_path/libexecutable_path\.dylib]] - [[@executable_path/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] - [[@executable_path/../lib/executable_path_postexcluded/libexecutable_path_postexcluded\.dylib]] - [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] - [[@rpath/librpath_executable_path\.dylib]] - [[@rpath/librpath_executable_path_bundle\.dylib]] - [[@rpath/librpath_executable_path_postexcluded\.dylib]] - [[@rpath/librpath_loader_path_unresolved\.dylib]] - [[@rpath/librpath_unresolved\.dylib]] - ) -check_contents(deps/udeps2.txt "^${_check}$") - -set(_check - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] - [[[^;]*/Tests/RunCMake/install/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}$") - -set(_check - [[@executable_path/../lib/executable_path/libexecutable_path\.dylib]] - [[@executable_path/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] - [[@executable_path/../lib/executable_path_postexcluded/libexecutable_path_postexcluded\.dylib]] - [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] - [[@rpath/librpath_executable_path\.dylib]] - [[@rpath/librpath_executable_path_bundle\.dylib]] - [[@rpath/librpath_executable_path_postexcluded\.dylib]] - [[@rpath/librpath_loader_path_unresolved\.dylib]] - [[@rpath/librpath_unresolved\.dylib]] - ) -check_contents(deps/udeps3.txt "^${_check}$") - -set(_check - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/bin/../lib/executable_path/libexecutable_path\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/bin/../lib/rpath_executable_path/librpath_executable_path\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] - [[[^;]*/Tests/RunCMake/install/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}$") - -set(_check - [[@executable_path/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] - [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] - [[@rpath/librpath_executable_path_bundle\.dylib]] - [[@rpath/librpath_loader_path_unresolved\.dylib]] - [[@rpath/librpath_unresolved\.dylib]] - ) -check_contents(deps/udeps4.txt "^${_check}$") - -set(_check - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/bundle_executable/bin/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] - [[[^;]*/Tests/RunCMake/install/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}$") - -set(_check - [[@executable_path/../lib/executable_path/libexecutable_path\.dylib]] - [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] - [[@rpath/librpath_executable_path\.dylib]] - [[@rpath/librpath_executable_path_bundle\.dylib]] - [[@rpath/librpath_loader_path_unresolved\.dylib]] - [[@rpath/librpath_unresolved\.dylib]] - ) -check_contents(deps/udeps5.txt "^${_check}$") - -set(_check - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/bundle_executable/bin/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/libtestlib\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] - [[[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/normal/libnormal\.dylib]] - [[[^;]*/Tests/RunCMake/install/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}$") - -set(_check - [[@executable_path/../lib/executable_path/libexecutable_path\.dylib]] - [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]] - [[@rpath/librpath_executable_path\.dylib]] - [[@rpath/librpath_executable_path_bundle\.dylib]] - [[@rpath/librpath_loader_path_unresolved\.dylib]] - [[@rpath/librpath_unresolved\.dylib]] - ) -check_contents(deps/udeps6.txt "^${_check}$") - -set(_check - "^libconflict\\.dylib:[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/conflict/libconflict\\.dylib;[^;]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-build/root-all/executable/lib/conflict2/libconflict\\.dylib\n$" - ) -check_contents(deps/cdeps1.txt "${_check}") -check_contents(deps/cdeps2.txt "${_check}") -check_contents(deps/cdeps3.txt "${_check}") -check_contents(deps/cdeps4.txt "${_check}") -check_contents(deps/cdeps5.txt "${_check}") -check_contents(deps/cdeps6.txt "${_check}") diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-all-stderr.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-all-stderr.txt deleted file mode 100644 index bc9e97a..0000000 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-all-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): - file Multiple conflicting paths found for librpath\.dylib: - - [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-build/root-all/lib/rpath1/librpath\.dylib - [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-conflict-build/root-all/lib/rpath2/librpath\.dylib$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-all-stderr.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-all-stderr.txt deleted file mode 100644 index 73ab9f1..0000000 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-all-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): - file Failed to run otool on: - - [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-macos-notfile-build/root-all/bin/\.\./lib/libtest\.dylib$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-all-stderr.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-all-stderr.txt deleted file mode 100644 index 66ecb93..0000000 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-all-stderr.txt +++ /dev/null @@ -1,7 +0,0 @@ -^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): - file Multiple conflicting paths found for (lib)?path\.dll: - - [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-build/root-all/lib/test1/(lib)?path\.dll - [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-conflict-build/root-all/lib/test2/(lib)?path\.dll$ diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-all-stderr.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-all-stderr.txt deleted file mode 100644 index f921409..0000000 --- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-all-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -^CMake Error at cmake_install\.cmake:[0-9]+ \(file\): - file Failed to run (dumpbin|objdump) on: - - [^ -]*/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-windows-notfile-build/root-all/bin/(lib)?test\.dll$ |