summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCUDAInformation.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2016-08-30 16:00:44 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2016-11-14 16:36:43 (GMT)
commitbf326ebb7694d2e86fbcfef4cb827c70531c3255 (patch)
tree3ef1d298f486c5dda00fc065faff2b887cf75fa0 /Modules/CMakeCUDAInformation.cmake
parentce4ec876ceb73f52055b617374c04dbbbfd2a98d (diff)
downloadCMake-bf326ebb7694d2e86fbcfef4cb827c70531c3255.zip
CMake-bf326ebb7694d2e86fbcfef4cb827c70531c3255.tar.gz
CMake-bf326ebb7694d2e86fbcfef4cb827c70531c3255.tar.bz2
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.
Diffstat (limited to 'Modules/CMakeCUDAInformation.cmake')
-rw-r--r--Modules/CMakeCUDAInformation.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake
index 3436681..491c35b 100644
--- a/Modules/CMakeCUDAInformation.cmake
+++ b/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