浏览代码

Merge topic 'FindCUDA-sccache'

53ffff2277 FindCUDA: Add support for sccache

Acked-by: Kitware Robot <[email protected]>
Merge-request: !2050
Brad King 7 年之前
父节点
当前提交
d54796cbd9
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      Modules/FindCUDA.cmake

+ 4 - 4
Modules/FindCUDA.cmake

@@ -557,10 +557,10 @@ 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.
+  elseif(MSVC AND "${CMAKE_C_COMPILER}" MATCHES "clcache|sccache")
+    # NVCC does not think it will work if it is passed clcache.exe or sccache.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}"