Skip to content

Commit

Permalink
Require CCCL 2.3.2 for CMake and MSVC fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ptheywood committed Mar 13, 2024
1 parent 4ea6196 commit dc75bb6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmake/dependencies/CCCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ cmake_policy(SET CMP0079 NEW)

# Set the minimum supported CCCL version, and the version to fetch
# using find_package(version) means it's up to CCCL's cmake to determine if newer versions are compatible, but this will likely need changing for CUDA 13, when CCCL is planned to have a major version bump (and drop CUDA 11 support).
set(MIN_REQUIRED_CCCL_VERSION 2.3.0)
set(CCCL_DOWNLOAD_TAG v2.3.0)
set(MIN_REQUIRED_CCCL_VERSION 2.3.2)
set(CCCL_DOWNLOAD_TAG v2.3.2)

# Use the FindCUDATooklit package (CMake > 3.17) to get the CUDA version and CUDA include directories for cub/thrust location hints
find_package(CUDAToolkit REQUIRED)

# Quietly find CCCL, to check if the version included with CUDA (if CCCL) is sufficiently new.
# Using CCCL avoids complex cub/thrust version workarounds previously required.
# However we cannot find thrust due to a missing guard in CCCL's cmake config file, and cannot find cub without finding libcudacxx, so just find libcudacxx quietly.
# The fix for this was merged into branch/2.3.x, but was not included in the v2.3.0 tagged commit.
# @todo - wait for and test 2.3.2/2.4.0.
# The fix for this was first included in the 2.3.2 release
find_package(CCCL ${MIN_REQUIRED_CCCL_VERSION} QUIET COMPONENTS libcudacxx CONFIG HINTS ${CUDAToolkit_INCLUDE_DIRS} ${CUDAToolkit_LIBRARY_DIR}/cmake)

# If CCCL was found, find it again but loudly (with all components)
Expand Down

0 comments on commit dc75bb6

Please sign in to comment.