FindCUDAToolkit: PATH_SUFFIXES ../ pattern breaks on symlinks
The CUDA toolkit layout in nvcr.io/nvidia/nvhpc:22.9-devel-cuda_multi-ubuntu22.04
has symlinks like /path/to/cuda/bin -> 11.7/bin
. As discussed in !7946 (comment 1280257), FindCUDAToolkit's use of a PATH_SUFFIXES ../
pattern causes libraries to be found at paths like /path/to/cuda/bin/../lib/libfoo.so
, but after removing bin/../
, the path does not exist. Pending some future CMake development that improves the path normalization behavior, FindCUDAToolkit needs to be revised to avoid using ../
in PATH_SUFFIXES
. !7945 (merged) already updated one such case IIUC.