Skip to content

CUDA: Fix Clang depfile flags when simulating MSVC

Raul Tambre requested to merge tambre/cmake:cuda_clang_simulate into master

__compiler_clang() doesn't call __compiler_gnu() if we're emulating MSVC. Thus CMAKE_DEPFILE_FLAGS_CUDA remains unset and compiling doesn't work, due to NVCC dependency injection workaround in CMakeCUDAInformation.cmake, which triggers for Ninja if they're not set.

Always set the depfile flags to fix this. Most other compiler modules seem to do the same.

Backport: release

Edited by Brad King

Merge request reports