瀏覽代碼

CUDA: Explicitly state all source files are cuda sources.

This way you can mark a .C/.CPP files as a cuda source file and
have nvcc build it as a cuda file.
Robert Maynard 9 年之前
父節點
當前提交
bf326ebb76
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Modules/CMakeCUDAInformation.cmake

+ 1 - 1
Modules/CMakeCUDAInformation.cmake

@@ -89,7 +89,7 @@ endif()
 # compile a cu file into an object file
 if(NOT CMAKE_CUDA_COMPILE_OBJECT)
   set(CMAKE_CUDA_COMPILE_OBJECT
-    "<CMAKE_CUDA_COMPILER>  <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+    "<CMAKE_CUDA_COMPILER>  <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -x cu -c <SOURCE>")
 endif()
 
 # compile a cu file into an executable