-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Description
find_package(CUDA) is the legacy way of using CMake to build CUDA code and was deprecated in CMake 3.10. #62445 transitioned over to enable_language(CUDA) which gives first class support for CUDA as a language in CMake. However, find_package(CUDA) is still being used to locate the CUDA toolkit libraries. This is potentially dangerous because we have two different mechanisms searching for the CUDA installation, each with their own configuration variables. So, it would be best to stop using FindCUDA.cmake entirely.
The modern CMake equivalent for library targets is find_package(CUDAToolkit) which requires CMake 3.17, so we can't assume it's present yet. However, it might also be possible to vendor FindCUDAToolkit.cmake and use it anyway.
There are also dependencies in third_party which still use find_package(CUDA)