An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit c3fab3e6 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'cuda-depfile-ccbin'

8e38985d

 Makefiles: Fix dependency extraction with CUDA < 10.2 and host compiler
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre's avatarRaul Tambre <raul@tambre.ee>
Acked-by: Robert Maynard's avatarRobert Maynard <robertjmaynard@gmail.com>
Merge-request: !5992
parents 1c3ea347 8e38985d
...@@ -111,6 +111,9 @@ include(CMakeCommonLanguageInclude) ...@@ -111,6 +111,9 @@ include(CMakeCommonLanguageInclude)
# CMAKE_CUDA_LINK_EXECUTABLE # CMAKE_CUDA_LINK_EXECUTABLE
if(CMAKE_CUDA_HOST_COMPILER AND CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") if(CMAKE_CUDA_HOST_COMPILER AND CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA")
# FIXME: This is too late for the Platform/Windows-NVIDIA-CUDA module to
# see it, so we do not support CMAKE_CUDA_HOST_COMPILER on Windows.
# Move this to Compiler/NVIDIA-CUDA and update the VS generator too.
string(APPEND _CMAKE_CUDA_EXTRA_FLAGS " -ccbin=<CMAKE_CUDA_HOST_COMPILER>") string(APPEND _CMAKE_CUDA_EXTRA_FLAGS " -ccbin=<CMAKE_CUDA_HOST_COMPILER>")
endif() endif()
......
...@@ -30,7 +30,15 @@ if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2.89) ...@@ -30,7 +30,15 @@ if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2.89)
# to get header dependency information # to get header dependency information
set(CMAKE_DEPFILE_FLAGS_CUDA "-MD -MT <DEP_TARGET> -MF <DEP_FILE>") set(CMAKE_DEPFILE_FLAGS_CUDA "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
else() 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>") if(CMAKE_CUDA_HOST_COMPILER AND NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
# FIXME: Move the main -ccbin= flag from CMakeCUDAInformation to
# a block above, remove this copy, and update the VS generator too.
set(_CMAKE_CUDA_EXTRA_FLAGS_LOCAL " -ccbin=<CMAKE_CUDA_HOST_COMPILER>")
else()
set(_CMAKE_CUDA_EXTRA_FLAGS_LOCAL "")
endif()
set(CMAKE_CUDA_DEPENDS_EXTRA_COMMANDS "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS}${_CMAKE_CUDA_EXTRA_FLAGS_LOCAL} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} -M <SOURCE> -MT <OBJECT> -o <DEP_FILE>")
unset(_CMAKE_CUDA_EXTRA_FLAGS_LOCAL)
endif() endif()
set(CMAKE_CUDA_DEPFILE_FORMAT gcc) set(CMAKE_CUDA_DEPFILE_FORMAT gcc)
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER) if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment