diff options
author | Raul Tambre <raul@tambre.ee> | 2020-03-17 19:09:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-04-07 13:33:25 (GMT) |
commit | 5f02add366f1fb3d952e88df15252945b5fed9b2 (patch) | |
tree | 1d020de53219e231ddc51814a969dd3389841937 | |
parent | 25439c7d62113a29e253c0556f8cb64e6c18c75c (diff) | |
download | CMake-5f02add366f1fb3d952e88df15252945b5fed9b2.zip CMake-5f02add366f1fb3d952e88df15252945b5fed9b2.tar.gz CMake-5f02add366f1fb3d952e88df15252945b5fed9b2.tar.bz2 |
CUDA: Refactor PTX compilation flag into compiler modules
-rw-r--r-- | Modules/CMakeCUDAInformation.cmake | 2 | ||||
-rw-r--r-- | Modules/Compiler/NVIDIA-CUDA.cmake | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake index f7eb4a7..ab562c6 100644 --- a/Modules/CMakeCUDAInformation.cmake +++ b/Modules/CMakeCUDAInformation.cmake @@ -138,7 +138,7 @@ endif() #Specify how to compile when ptx has been requested if(NOT CMAKE_CUDA_COMPILE_PTX_COMPILATION) set(CMAKE_CUDA_COMPILE_PTX_COMPILATION - "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} -ptx <SOURCE> -o <OBJECT>") + "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} ${_CMAKE_CUDA_PTX_FLAG} <SOURCE> -o <OBJECT>") endif() #Specify how to compile when separable compilation has been requested diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake index 2a2564e..e24738d 100644 --- a/Modules/Compiler/NVIDIA-CUDA.cmake +++ b/Modules/Compiler/NVIDIA-CUDA.cmake @@ -5,6 +5,7 @@ set(CMAKE_CUDA_VERBOSE_FLAG "-v") set(CMAKE_CUDA_VERBOSE_COMPILE_FLAG "-Xcompiler=-v") set(_CMAKE_COMPILE_AS_CUDA_FLAG "-x cu") +set(_CMAKE_CUDA_PTX_FLAG "-ptx") if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2.89) # The -forward-unknown-to-host-compiler flag was only |