summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Clang-CUDA.cmake
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-04-22 16:51:26 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2022-07-22 14:34:45 (GMT)
commit96bc59b1ca01be231347404d178445263687dd22 (patch)
treed9c015f30a1e43f0d5ded6dc75a638471f085ed6 /Modules/Compiler/Clang-CUDA.cmake
parent1527d48cd0071e3e1737b51db3738f7f76ddbf80 (diff)
downloadCMake-96bc59b1ca01be231347404d178445263687dd22.zip
CMake-96bc59b1ca01be231347404d178445263687dd22.tar.gz
CMake-96bc59b1ca01be231347404d178445263687dd22.tar.bz2
CUDA: Add Device LTO support for nvcc
Fixes #22200
Diffstat (limited to 'Modules/Compiler/Clang-CUDA.cmake')
-rw-r--r--Modules/Compiler/Clang-CUDA.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-CUDA.cmake b/Modules/Compiler/Clang-CUDA.cmake
index 219897e..d9929f1 100644
--- a/Modules/Compiler/Clang-CUDA.cmake
+++ b/Modules/Compiler/Clang-CUDA.cmake
@@ -35,6 +35,10 @@ set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "cudadevrt;cudart_static")
set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_SHARED "cudadevrt;cudart")
set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_NONE "")
+# Clang doesn't support CUDA device LTO
+set(_CMAKE_CUDA_IPO_SUPPORTED_BY_CMAKE NO)
+set(_CMAKE_CUDA_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO)
+
if(UNIX)
list(APPEND CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "rt" "pthread" "dl")
endif()