summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-04-09 15:19:32 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-04-09 15:19:44 (GMT)
commit847ae3882e04e5d5e350da8944e6ed0cf896769d (patch)
treeb02182085139eaad31acca87b773271a93655f63 /Modules
parent13f19f747230fa2ce414084d1e3a94eb225dbaa1 (diff)
parent2da36984475678858885ab35c2711726c710f4e1 (diff)
downloadCMake-847ae3882e04e5d5e350da8944e6ed0cf896769d.zip
CMake-847ae3882e04e5d5e350da8944e6ed0cf896769d.tar.gz
CMake-847ae3882e04e5d5e350da8944e6ed0cf896769d.tar.bz2
Merge topic 'FindCUDA-nvcc-clcache-support'
2da3698447 FindCUDA: Add support for clcache Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1933
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDA.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 6f6f349..a0e4aa9 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -557,6 +557,11 @@ else()
set(c_compiler_realpath "")
endif()
set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC")
+ elseif(MSVC AND "${CMAKE_C_COMPILER}" MATCHES "clcache")
+ # NVCC does not think it will work if it is passed clcache.exe as the host
+ # compiler, which means that builds with CC=cl.exe won't work. Best to just
+ # feed it whatever the actual cl.exe is as the host compiler.
+ set(CUDA_HOST_COMPILER "cl.exe" CACHE FILEPATH "Host side compiler used by NVCC")
else()
set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}"
CACHE FILEPATH "Host side compiler used by NVCC")