diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-12-02 16:31:02 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-12-02 16:31:02 (GMT) |
commit | 8981e3e7ccba26084d86504e47b906bd55cb0a13 (patch) | |
tree | 2a597594ee12b8de30f07bba54069a87514344ce /Modules/Compiler | |
parent | a0f2e8cbfaf62f2a15adf4bf58170f81b7fea250 (diff) | |
download | CMake-8981e3e7ccba26084d86504e47b906bd55cb0a13.zip CMake-8981e3e7ccba26084d86504e47b906bd55cb0a13.tar.gz CMake-8981e3e7ccba26084d86504e47b906bd55cb0a13.tar.bz2 |
NVIDIA-CUDA: rely on new capabilities for deps generation
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/NVIDIA-CUDA.cmake | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake index 3e8d4eb..eb80675 100644 --- a/Modules/Compiler/NVIDIA-CUDA.cmake +++ b/Modules/Compiler/NVIDIA-CUDA.cmake @@ -29,13 +29,12 @@ if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2.89) # before that we had to invoke the compiler twice # to get header dependency information set(CMAKE_DEPFILE_FLAGS_CUDA "-MD -MT <DEP_TARGET> -MF <DEP_FILE>") +else() + set(CMAKE_CUDA_DEPENDS_EXTRA_COMMANDS "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} -M <SOURCE> -MT <OBJECT> -o <DEP_FILE>") endif() +set(CMAKE_CUDA_DEPFILE_FORMAT gcc) if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER) AND CMAKE_GENERATOR MATCHES "Makefiles|WMake") - if (NOT CMAKE_DEPFILE_FLAGS_CUDA) - set(CMAKE_CUDA_DEPENDS_EXTRA_COMMANDS "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} -M <SOURCE> -MT <OBJECT> -o <DEP_FILE>") - endif() - set(CMAKE_CUDA_DEPFILE_FORMAT gcc) set(CMAKE_CUDA_DEPENDS_USE_COMPILER TRUE) endif() |