summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-05 14:37:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-05 14:37:47 (GMT)
commite0f735f8f53543773f01a4f692609d1b23fd3621 (patch)
tree0acfa05c81e6a40ad57264b8aa9b3787108fedf1 /Tests
parent26a3bccb60b1ba97b528187c244acf4c3bbceb3e (diff)
parentd75cad01f0a43c55f999768fb63287fc247f9685 (diff)
downloadCMake-e0f735f8f53543773f01a4f692609d1b23fd3621.zip
CMake-e0f735f8f53543773f01a4f692609d1b23fd3621.tar.gz
CMake-e0f735f8f53543773f01a4f692609d1b23fd3621.tar.bz2
Merge topic 'shared-deps-no-iface'
d75cad01f0 Fix rpath-link for shared lib with only private deps 4b2e1fc9ee cmGeneratorTarget: Use local var to de-duplicate CMP0022 checks 94648953be cmLinkItem: Simplify tracking of whether link interface is explicit Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3642
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RuntimePath/CMakeLists.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/Tests/RuntimePath/CMakeLists.txt b/Tests/RuntimePath/CMakeLists.txt
index 6583a87..bb87440 100644
--- a/Tests/RuntimePath/CMakeLists.txt
+++ b/Tests/RuntimePath/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required (VERSION 3.15)
project(RuntimePath C)
# Add a simple chain of shared libraries that must be found.
@@ -31,3 +31,14 @@ if(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
set_property(TARGET bar2 PROPERTY LIBRARY_OUTPUT_DIRECTORY A)
target_link_libraries(bar2 foo2)
endif()
+
+# Add a library that is missing the rpath for its dependency.
+add_library(bar1_no_rpath SHARED bar1.c)
+set_property(TARGET bar1_no_rpath PROPERTY LIBRARY_OUTPUT_DIRECTORY B)
+set_property(TARGET bar1_no_rpath PROPERTY SKIP_BUILD_RPATH 1)
+target_link_libraries(bar1_no_rpath PRIVATE foo1)
+
+# Add an executable linking to the library with a missing dependency rpath.
+# CMake should generate the proper rpath-link flag to find it at build time.
+add_executable(main_with_bar1_no_rpath main.c)
+target_link_libraries(main_with_bar1_no_rpath bar1_no_rpath)