Skip to content
Snippets Groups Projects
Commit 8e38985d authored by Brad King's avatar Brad King
Browse files

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

Since commit 2c71d051 (Makefiles Generators: use compiler for
dependencies generation, 2020-10-18, v3.20.0-rc1~392^2) 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 commit 8981e3e7
(NVIDIA-CUDA: rely on new capabilities for deps generation, 2020-12-02,
v3.20.0-rc1~362^2).

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
parent f8af94a2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment