summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-16 14:50:27 (GMT)
committerBrad King <brad.king@kitware.com>2020-06-16 15:17:55 (GMT)
commit248d0570c9016392feb841ffce6ac77e194aefe8 (patch)
tree2a43f5ef582fa6b2af06015b070fb9402214e455 /Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake
parent3f110a08571e3a506184e6b8a8e9622317435912 (diff)
downloadCMake-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/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake')
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake54
1 files changed, 0 insertions, 54 deletions
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake
deleted file mode 100644
index f719499..0000000
--- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-conflict.cmake
+++ /dev/null
@@ -1,54 +0,0 @@
-enable_language(C)
-
-set(test1_names rpath)
-set(test2_names rpath)
-
-file(WRITE "${CMAKE_BINARY_DIR}/rpath.c" "void rpath(void) {}\n")
-add_library(rpath SHARED "${CMAKE_BINARY_DIR}/rpath.c")
-install(TARGETS rpath DESTINATION lib/rpath1)
-install(TARGETS rpath DESTINATION lib/rpath2)
-
-file(REMOVE "${CMAKE_BINARY_DIR}/test1.c")
-add_library(test1 SHARED "${CMAKE_BINARY_DIR}/test1.c")
-foreach(name ${test1_names})
- file(APPEND "${CMAKE_BINARY_DIR}/test1.c" "extern void ${name}(void);\n")
-endforeach()
-file(APPEND "${CMAKE_BINARY_DIR}/test1.c" "void test1(void)\n{\n")
-foreach(name ${test1_names})
- file(APPEND "${CMAKE_BINARY_DIR}/test1.c" " ${name}();\n")
-endforeach()
-file(APPEND "${CMAKE_BINARY_DIR}/test1.c" "}\n")
-
-target_link_libraries(test1 PRIVATE ${test1_names})
-set_property(TARGET test1 PROPERTY INSTALL_RPATH
- "${CMAKE_BINARY_DIR}/root-all/lib/rpath1"
- )
-
-file(REMOVE "${CMAKE_BINARY_DIR}/test2.c")
-add_library(test2 SHARED "${CMAKE_BINARY_DIR}/test2.c")
-foreach(name ${test2_names})
- file(APPEND "${CMAKE_BINARY_DIR}/test2.c" "extern void ${name}(void);\n")
-endforeach()
-file(APPEND "${CMAKE_BINARY_DIR}/test2.c" "void test2(void)\n{\n")
-foreach(name ${test2_names})
- file(APPEND "${CMAKE_BINARY_DIR}/test2.c" " ${name}();\n")
-endforeach()
-file(APPEND "${CMAKE_BINARY_DIR}/test2.c" "}\n")
-
-target_link_libraries(test2 PRIVATE ${test2_names})
-set_property(TARGET test2 PROPERTY INSTALL_RPATH
- "${CMAKE_BINARY_DIR}/root-all/lib/rpath2"
- )
-
-install(TARGETS test1 test2 DESTINATION lib)
-
-install(CODE [[
- file(GET_RUNTIME_DEPENDENCIES
- LIBRARIES
- "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:test1>"
- "${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:test2>"
- PRE_INCLUDE_REGEXES "^librpath\\.so$"
- PRE_EXCLUDE_REGEXES ".*"
- )
- message(FATAL_ERROR "This message should not be displayed")
- ]])