@@ -229,30 +229,6 @@ if(USE_CUDA)
229
229
endif ()
230
230
231
231
find_package (CUDAToolkit REQUIRED )
232
- find_package (CCCL CONFIG )
233
- if (CCCL_FOUND )
234
- message (STATUS "Standalone CCCL found." )
235
- else ()
236
- message (STATUS "Standalone CCCL not found. Attempting to use CCCL from CUDA Toolkit..." )
237
- find_package (CCCL CONFIG
238
- HINTS ${CUDAToolkit_LIBRARY_DIR} /cmake )
239
- if (NOT CCCL_FOUND )
240
- message (STATUS "Could not locate CCCL from CUDA Toolkit. Using Thrust and CUB from CUDA Toolkit..." )
241
- find_package (libcudacxx CONFIG REQUIRED
242
- HINTS ${CUDAToolkit_LIBRARY_DIR} /cmake )
243
- find_package (CUB CONFIG REQUIRED
244
- HINTS ${CUDAToolkit_LIBRARY_DIR} /cmake )
245
- find_package (Thrust CONFIG REQUIRED
246
- HINTS ${CUDAToolkit_LIBRARY_DIR} /cmake )
247
- thrust_create_target (Thrust HOST CPP DEVICE CUDA )
248
- add_library (CCCL::CCCL INTERFACE IMPORTED GLOBAL )
249
- target_link_libraries (CCCL::CCCL INTERFACE libcudacxx::libcudacxx CUB::CUB Thrust )
250
- endif ()
251
- endif ()
252
- # Define guard macros to prevent windows.h from conflicting with winsock2.h
253
- if (WIN32 )
254
- target_compile_definitions (CCCL::CCCL INTERFACE NOMINMAX WIN32_LEAN_AND_MEAN _WINSOCKAPI_ )
255
- endif ()
256
232
endif ()
257
233
258
234
if (FORCE_COLORED_OUTPUT AND (CMAKE_GENERATOR STREQUAL "Ninja" ) AND
@@ -338,6 +314,34 @@ if(PLUGIN_RMM)
338
314
list (REMOVE_ITEM rmm_link_libs CUDA::cudart )
339
315
list (APPEND rmm_link_libs CUDA::cudart_static )
340
316
set_target_properties (rmm::rmm PROPERTIES INTERFACE_LINK_LIBRARIES "${rmm_link_libs} " )
317
+
318
+ # Pick up patched CCCL from RMM
319
+ elseif (USE_CUDA )
320
+ # If using CUDA and not RMM, search for CCCL.
321
+ find_package (CCCL CONFIG )
322
+ if (CCCL_FOUND )
323
+ message (STATUS "Standalone CCCL found." )
324
+ else ()
325
+ message (STATUS "Standalone CCCL not found. Attempting to use CCCL from CUDA Toolkit..." )
326
+ find_package (CCCL CONFIG
327
+ HINTS ${CUDAToolkit_LIBRARY_DIR} /cmake )
328
+ if (NOT CCCL_FOUND )
329
+ message (STATUS "Could not locate CCCL from CUDA Toolkit. Using Thrust and CUB from CUDA Toolkit..." )
330
+ find_package (libcudacxx CONFIG REQUIRED
331
+ HINTS ${CUDAToolkit_LIBRARY_DIR} /cmake )
332
+ find_package (CUB CONFIG REQUIRED
333
+ HINTS ${CUDAToolkit_LIBRARY_DIR} /cmake )
334
+ find_package (Thrust CONFIG REQUIRED
335
+ HINTS ${CUDAToolkit_LIBRARY_DIR} /cmake )
336
+ thrust_create_target (Thrust HOST CPP DEVICE CUDA )
337
+ add_library (CCCL::CCCL INTERFACE IMPORTED GLOBAL )
338
+ target_link_libraries (CCCL::CCCL INTERFACE libcudacxx::libcudacxx CUB::CUB Thrust )
339
+ endif ()
340
+ endif ()
341
+ # Define guard macros to prevent windows.h from conflicting with winsock2.h
342
+ if (WIN32 )
343
+ target_compile_definitions (CCCL::CCCL INTERFACE NOMINMAX WIN32_LEAN_AND_MEAN _WINSOCKAPI_ )
344
+ endif ()
341
345
endif ()
342
346
343
347
if (PLUGIN_SYCL )
0 commit comments