File tree 3 files changed +17
-12
lines changed
3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -107,21 +107,13 @@ function(_cn_init_target_list)
107
107
set (cudax_TARGETS "" CACHE INTERNAL "" FORCE)
108
108
endfunction ()
109
109
110
- # Bring in thrust as a dev dependency, only used in tests:
111
- find_package (Thrust ${cudax_VERSION} EXACT CONFIG
112
- NO_DEFAULT_PATH # Only check the explicit path in HINTS:
113
- HINTS "${CCCL_SOURCE_DIR} /lib/cmake/thrust/"
114
- )
115
- thrust_create_target(cudax::Thrust)
116
-
117
110
function (_cn_add_target_to_target_list target_name dialect prefix )
118
111
add_library (${target_name} INTERFACE )
119
112
120
113
cudax_set_target_properties(${target_name} ${dialect} ${prefix} )
121
114
122
115
target_link_libraries (${target_name} INTERFACE
123
116
cudax::cudax
124
- cudax::Thrust
125
117
cudax.compiler_interface_cpp${dialect}
126
118
)
127
119
Original file line number Diff line number Diff line change 1
1
include ("${cudax_SOURCE_DIR} /cmake/CPM.cmake" )
2
2
CPMAddPackage(
"gh:catchorg/[email protected] " )
3
3
4
+ find_package (Thrust ${cudax_VERSION} EXACT CONFIG
5
+ NO_DEFAULT_PATH # Only check the explicit path in HINTS:
6
+ HINTS "${CCCL_SOURCE_DIR} /lib/cmake/thrust/"
7
+ )
8
+ thrust_create_target(cudax.test .thrust)
9
+
4
10
add_library (catch2_main STATIC catch2_helpers/catch2_main.cpp)
5
11
target_link_libraries (catch2_main PUBLIC Catch2::Catch2)
6
12
@@ -24,9 +30,16 @@ function(cudax_add_catch2_test target_name_var test_name cn_target) # ARGN=test
24
30
25
31
add_executable (${test_target} ${test_sources} )
26
32
target_include_directories (${test_target} PRIVATE "common" )
27
- target_link_libraries (${test_target} PRIVATE ${cn_target} Catch2::Catch2 catch2_main)
28
- target_compile_options (${test_target} PRIVATE "-DLIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE" )
29
- target_compile_options (${test_target} PRIVATE $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--extended-lambda>)
33
+ target_link_libraries (${test_target} PRIVATE
34
+ ${cn_target}
35
+ cudax.test .thrust
36
+ Catch2::Catch2
37
+ catch2_main
38
+ )
39
+ target_compile_options (${test_target} PRIVATE
40
+ "-DLIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE"
41
+ $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--extended-lambda>
42
+ )
30
43
cudax_clone_target_properties(${test_target} ${cn_target} )
31
44
set_target_properties (${test_target} PROPERTIES
32
45
CUDA_ARCHITECTURES "${CMAKE_CUDA_ARCHITECTURES} "
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ if (cudax_NO_IMPORTED_TARGETS)
48
48
add_library (_cudax_cudax INTERFACE )
49
49
add_library (cudax::cudax ALIAS _cudax_cudax)
50
50
set (cn_target_name _cudax_cudax)
51
- else ()
51
+ else ()
52
52
add_library (cudax::cudax INTERFACE IMPORTED GLOBAL )
53
53
set (cn_target_name cudax::cudax)
54
54
endif ()
You can’t perform that action at this time.
0 commit comments