diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2023-01-27 20:46:19 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2023-03-13 13:54:00 (GMT) |
commit | 2def6a874b52ef70157f101cbca9ee9b92a5a7f5 (patch) | |
tree | f08dda163a1d8af66c4ce780cae0875ec2a4696f /Modules/Compiler/NVIDIA-CUDA.cmake | |
parent | 7b37ebe8357d9b1e2a5c97b58c9f2f5b690d163e (diff) | |
download | CMake-2def6a874b52ef70157f101cbca9ee9b92a5a7f5.zip CMake-2def6a874b52ef70157f101cbca9ee9b92a5a7f5.tar.gz CMake-2def6a874b52ef70157f101cbca9ee9b92a5a7f5.tar.bz2 |
CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation
Diffstat (limited to 'Modules/Compiler/NVIDIA-CUDA.cmake')
-rw-r--r-- | Modules/Compiler/NVIDIA-CUDA.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
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 |