summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-01-08 14:47:05 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-01-08 14:47:15 (GMT)
commita3f76a4e4dc15997f22306b002fbc452af1259a6 (patch)
tree4111bd85d836501c9e41fc4b505659be2df46fbc /Modules
parent2cc792ba29668f3d8d4a2a03ff79baba947ec3c2 (diff)
parent2c6ec6de1521b1e82f2bd5ac3324f6953ac31f4d (diff)
downloadCMake-a3f76a4e4dc15997f22306b002fbc452af1259a6.zip
CMake-a3f76a4e4dc15997f22306b002fbc452af1259a6.tar.gz
CMake-a3f76a4e4dc15997f22306b002fbc452af1259a6.tar.bz2
Merge topic 'link-stubs-transitively'
2c6ec6de15 Link to transitive dependencies on stub libraries only on some linkers dd4a6dff92 Link explicitly to private transitive dependencies on stub libraries 5f1bbdb3b3 Tests: Enable RunCMake.RuntimePath test on more platforms Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9050
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDAToolkit.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index 469a7ad..ac72c17 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -1100,7 +1100,10 @@ if(CUDAToolkit_FOUND)
if(CUDA_${lib_name}_LIBRARY MATCHES "/stubs/" AND NOT WIN32)
# Use a SHARED library with IMPORTED_IMPLIB, but not IMPORTED_LOCATION,
# to indicate that the stub is for linkers but not dynamic loaders.
- # It will not contribute any RPATH entry.
+ # It will not contribute any RPATH entry. When encountered as
+ # a private transitive dependency of another shared library,
+ # it will be passed explicitly to linkers so they can find it
+ # even when the runtime library file does not exist on disk.
set(CUDA_IMPORT_PROPERTY IMPORTED_IMPLIB)
set(CUDA_IMPORT_TYPE SHARED)
endif()