diff options
author | Raul Tambre <raul@tambre.ee> | 2020-06-07 12:26:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-08 11:54:51 (GMT) |
commit | 0f88b7a5924bbb37239ebb8399096cf9ebb6b7f0 (patch) | |
tree | df8d47132b13e0be3109315d25b71c34d58449fa /Modules/Compiler/Clang-CUDA.cmake | |
parent | 01069f9a107eba9765541640c65c72cc3bc27620 (diff) | |
download | CMake-0f88b7a5924bbb37239ebb8399096cf9ebb6b7f0.zip CMake-0f88b7a5924bbb37239ebb8399096cf9ebb6b7f0.tar.gz CMake-0f88b7a5924bbb37239ebb8399096cf9ebb6b7f0.tar.bz2 |
CUDA: Fix Clang depfile flags when simulating MSVC
__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.
Diffstat (limited to 'Modules/Compiler/Clang-CUDA.cmake')
-rw-r--r-- | Modules/Compiler/Clang-CUDA.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-CUDA.cmake b/Modules/Compiler/Clang-CUDA.cmake index a970985..336827b 100644 --- a/Modules/Compiler/Clang-CUDA.cmake +++ b/Modules/Compiler/Clang-CUDA.cmake @@ -1,6 +1,9 @@ include(Compiler/Clang) __compiler_clang(CUDA) +# Set explicitly, because __compiler_clang() doesn't set this if we're simulating MSVC. +set(CMAKE_DEPFILE_FLAGS_CUDA "-MD -MT <OBJECT> -MF <DEPFILE>") + # C++03 isn't supported for CXX, but is for CUDA, so we need to set these manually. # Do this before __compiler_clang_cxx_standards() since that adds the feature. set(CMAKE_CUDA03_STANDARD_COMPILE_OPTION "-std=c++03") |