Skip to content

FindCUDATookit: Fix ordering of libraries in imported targets

Dan Ibanez requested to merge ibaned/cmake:cudatoolkit-ordering into master

Before this a downstream code linking to CUDA::cusparse_static and CUDA::curand_static would get a link line with libcusparse_static.a, then libculibos.a, then libcurand_static.a. Using IMPORTED_LOCATION restores the proper dependency ordering where libculibos.a comes last, because the other two libraries depend on libculibos.a.

Fixes: #22365 (closed)
Topic-rename: FindCUDATookit-ordering

Edited by Brad King

Merge request reports