mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 22:50:26 -06:00
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.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user