summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/NVIDIA-CUDA.cmake
diff options
context:
space:
mode:
authorjanbernloehr <jan@bernloehrs.de>2020-10-30 14:01:06 (GMT)
committerBrad King <brad.king@kitware.com>2020-11-02 14:39:36 (GMT)
commitbcdd486bf761244a6921fbcb382a3be99c40107e (patch)
treea2cb6ac20040d87db1f81447958e67cd1337427a /Modules/Compiler/NVIDIA-CUDA.cmake
parentf506cc6bb2d16b8876bd6e38741e80fc88482d1f (diff)
downloadCMake-bcdd486bf761244a6921fbcb382a3be99c40107e.zip
CMake-bcdd486bf761244a6921fbcb382a3be99c40107e.tar.gz
CMake-bcdd486bf761244a6921fbcb382a3be99c40107e.tar.bz2
CUDA: Enable support on QNX
This fixes the following two issues with the CUDA support on QNX: * cuda target name is not derived correctly (should be `aarch64-qnx`). * linking `cudart` must not be linked against `rt`, `dl`, `pthread`. This enables to use cmake's native cuda support on QNX. Fixes: #21381
Diffstat (limited to 'Modules/Compiler/NVIDIA-CUDA.cmake')
-rw-r--r--Modules/Compiler/NVIDIA-CUDA.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake
index 1a724a0..95a51f6 100644
--- a/Modules/Compiler/NVIDIA-CUDA.cmake
+++ b/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -64,7 +64,7 @@ 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 "")
-if(UNIX)
+if(UNIX AND NOT (CMAKE_SYSTEM_NAME STREQUAL "QNX"))
list(APPEND CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "rt" "pthread" "dl")
endif()