Skip to content

Use FindCUDAToolkit and stop using FindCUDA.

Joe Jordan requested to merge cuda-bump-cmake-version into main

The use of find_package(CUDA) has been deprecated since cmake 3.10, and replaced by find_package(CUDAToolkit) in cmake 3.17. Further, in cmake 3.18 handling of the setting of cuda compiler flags has been added in cmake 3.18. This means a bump in cmake version can make handling of cuda setup much simpler. This MR seeks to eliminate our custom code where possible because it is handled by cmake now.

This MR also updates the way flags are passed to nvcc to reflect the differences between CUDA and CUDAToolkit. It has been verified that flags are set and that updating occurs when flags are changed.

This also aids library restructuring because it makes it easier to set cuda flags on a per target basis.

Relates to #3288, #4428 (closed)

Edited by Joe Jordan

Merge request reports