File: fix-building-without-cuda.patch

package info (click to toggle)
cccl 2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,200 kB
  • sloc: cpp: 236,258; python: 6,415; sh: 2,407; perl: 460; makefile: 114; xml: 13
file content (29 lines) | stat: -rw-r--r-- 854 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Author: Andreas Beckmann <anbe@debian.org>
Description: fix building without CUDA toolkit

--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -32,6 +32,7 @@ set(cmake_cpm_opts
   -D "CCCL_TAG=${CCCL_EXAMPLE_CPM_TAG}"
 )
 
+if (CMAKE_CUDA_COMPILER)
 cccl_add_compile_test(test_name
   cccl.example
   example_project
@@ -39,3 +40,4 @@ cccl_add_compile_test(test_name
   ${cmake_opts}
   ${cmake_cpm_opts}
 )
+endif()
--- a/libcudacxx/CMakeLists.txt
+++ b/libcudacxx/CMakeLists.txt
@@ -68,7 +68,7 @@ if (LIBCUDACXX_ENABLE_CUDA)
   set(CMAKE_CUDA_ARCHITECTURES "${CMAKE_CUDA_ARCHITECTURES}" PARENT_SCOPE)
 endif ()
 
-option(LIBCUDACXX_ENABLE_LIBCUDACXX_TESTS "Enable libcu++ tests." ON)
+option(LIBCUDACXX_ENABLE_LIBCUDACXX_TESTS "Enable libcu++ tests." ${LIBCUDACXX_ENABLE_CUDA})
 if (LIBCUDACXX_ENABLE_LIBCUDACXX_TESTS)
   enable_testing()