summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-14 13:34:42 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-03-14 13:35:00 (GMT)
commitdb4f4ad24e9a0ec8e0cb22b6b0204173d06e1cf8 (patch)
tree371c95db87ee1b9956ad84fd9f889196d027dc60 /Modules
parent9b68949a27e6962423fb75296b06f4d6d1e6cf73 (diff)
parent2def6a874b52ef70157f101cbca9ee9b92a5a7f5 (diff)
downloadCMake-db4f4ad24e9a0ec8e0cb22b6b0204173d06e1cf8.zip
CMake-db4f4ad24e9a0ec8e0cb22b6b0204173d06e1cf8.tar.gz
CMake-db4f4ad24e9a0ec8e0cb22b6b0204173d06e1cf8.tar.bz2
Merge topic 'support_cubin_fatbin_optix_cuda_output'
2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8259
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCUDAInformation.cmake1
-rw-r--r--Modules/Compiler/NVIDIA-CUDA.cmake5
2 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake
index dea721e..e774088 100644
--- a/Modules/CMakeCUDAInformation.cmake
+++ b/Modules/CMakeCUDAInformation.cmake
@@ -134,7 +134,6 @@ include(CMakeCommonLanguageInclude)
# CMAKE_CUDA_CREATE_SHARED_LIBRARY
# CMAKE_CUDA_CREATE_SHARED_MODULE
# CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
-# CMAKE_CUDA_COMPILE_PTX_COMPILATION
# CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION
# CMAKE_CUDA_LINK_EXECUTABLE
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake
index 0823954..c839d1c 100644
--- a/Modules/Compiler/NVIDIA-CUDA.cmake
+++ b/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -8,6 +8,11 @@ set(_CMAKE_COMPILE_AS_CUDA_FLAG "-x cu")
set(_CMAKE_CUDA_WHOLE_FLAG "-c")
set(_CMAKE_CUDA_RDC_FLAG "-rdc=true")
set(_CMAKE_CUDA_PTX_FLAG "-ptx")
+set(_CMAKE_CUDA_CUBIN_FLAG "-cubin")
+set(_CMAKE_CUDA_FATBIN_FLAG "-fatbin")
+if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "11.7.0")
+ set(_CMAKE_CUDA_OPTIX_FLAG "-optix-ir")
+endif()
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2.89)
# The -forward-unknown-to-host-compiler flag was only