From 2def6a874b52ef70157f101cbca9ee9b92a5a7f5 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 27 Jan 2023 15:46:19 -0500 Subject: CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation --- Modules/Compiler/NVIDIA-CUDA.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Modules/Compiler') diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake index 0823954302..c839d1cbbb 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 -- cgit v1.2.1