summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux
diff options
context:
space:
mode:
authorAlex Lapenkou <alex.lapenkou@chicagotrading.com>2022-11-29 21:04:31 (GMT)
committerBrad King <brad.king@kitware.com>2022-12-02 14:00:06 (GMT)
commit136622a2b20ee36808cdf4e8dc2bf64fdf7e2f07 (patch)
tree03b36a683e304008fa8b4052b2275d4e37c1c603 /Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux
parent4aa3149c67165952306ed457eeaaab52a90285a5 (diff)
downloadCMake-136622a2b20ee36808cdf4e8dc2bf64fdf7e2f07.zip
CMake-136622a2b20ee36808cdf4e8dc2bf64fdf7e2f07.tar.gz
CMake-136622a2b20ee36808cdf4e8dc2bf64fdf7e2f07.tar.bz2
file(GET_RUNTIME_DEPENDENCIES): propagate transitive parent's rpath
This fixes incorrect runtime dependency resolution when the dependency is located in rpaths of a transitive parent. Instead of supplying only the rpaths of the immediate parent, it combines the rpaths of all transitive parents and passes them down. Fixes: #24172
Diffstat (limited to 'Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux')
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/main.c12
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/one.c7
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/three.c3
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/two.c6
4 files changed, 28 insertions, 0 deletions
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/main.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/main.c
new file mode 100644
index 0000000..12aba5d
--- /dev/null
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/main.c
@@ -0,0 +1,12 @@
+extern void one(void);
+extern void two(void);
+extern void three(void);
+
+int main(void)
+{
+ one();
+ two();
+ three();
+
+ return 0;
+}
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/one.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/one.c
new file mode 100644
index 0000000..9998da8
--- /dev/null
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/one.c
@@ -0,0 +1,7 @@
+extern void two(void);
+extern void three(void);
+
+void one(void)
+{
+ two();
+}
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/three.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/three.c
new file mode 100644
index 0000000..0be5f47
--- /dev/null
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/three.c
@@ -0,0 +1,3 @@
+void three(void)
+{
+}
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/two.c b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/two.c
new file mode 100644
index 0000000..370baf7
--- /dev/null
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux/parent-rpath-propagation/two.c
@@ -0,0 +1,6 @@
+extern void three(void);
+
+void two(void)
+{
+ three();
+}