Skip to content

Makefiles: Fix dependency extraction with CUDA < 10.2 and host compiler

Brad King requested to merge brad.king/cmake:cuda-depfile-ccbin into master

Since !5528 (merged) we invoke nvcc for CUDA < 10.2 a second time in order to generate a depfile. When CMAKE_CUDA_HOST_COMPILER is set, the second invocation is missing its -ccbin= option, even after refactoring in !5566 (merged).

Ideally we should move the -ccbin= flag into Compiler/NVIDIA-CUDA, but that will add CMAKE_CUDA_HOST_COMPILER support on Windows in command-line generators but not the Visual Studio generators. For now, add the flag to the depfile command specifically.

Fixes: #22037 (closed)
Backport: release

Edited by Brad King

Merge request reports