I write two lines of find_library in my project,
find_library(CUDASTUB libcuda.so HINTS ${CUDA_TOOLKIT_ROOT_DIR}/lib64/stubs/ REQUIRED)
find_library(CUDASO libcuda.so.1 HINTS ${CUDASO_LIB} REQUIRED)
the first one finds libcuda.so, and the second one finds libcuda.so.1.
And i got the following warning,
CMake Warning at cmake/core.cmake:68 (add_executable):
Cannot generate a safe runtime search path for target test_analyze_ir
because files in some directories may conflict with libraries in implicit
directories:
runtime library [libcuda.so.1] in /usr/local/cuda/lib64/stubs may be hidden by files in:
/usr/local/cuda-11.2/compat
Some of these libraries may not be found correctly.
I think cmake is confusing about these two dso?