diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e09940652..543ab7ada9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,7 +117,7 @@ if( TRACCC_SETUP_EIGEN3 ) endif() endif() -# Set up Thrust. +# Set up CCCL. option( TRACCC_SETUP_THRUST "Set up the Thrust target(s) explicitly" TRUE ) option( TRACCC_USE_SYSTEM_THRUST @@ -127,7 +127,7 @@ if( TRACCC_SETUP_THRUST ) if( TRACCC_USE_SYSTEM_THRUST ) find_package( Thrust REQUIRED ) else() - add_subdirectory( extern/thrust ) + add_subdirectory( extern/cccl ) endif() endif() # Set up an IMPORTED library on top of the Thrust library/libraries. One that diff --git a/extern/cccl/CMakeLists.txt b/extern/cccl/CMakeLists.txt new file mode 100644 index 0000000000..685cca35f1 --- /dev/null +++ b/extern/cccl/CMakeLists.txt @@ -0,0 +1,46 @@ +# TRACCC library, part of the ACTS project (R&D line) +# +# (c) 2021-2024 CERN for the benefit of the ACTS project +# +# Mozilla Public License Version 2.0 + +# CMake include(s). +cmake_minimum_required( VERSION 3.14 ) +include( FetchContent ) + +# Silence FetchContent warnings with CMake >=3.24. +if( POLICY CMP0135 ) + cmake_policy( SET CMP0135 NEW ) +endif() + +# Tell the user what's happening. +message( STATUS "Building CCCL as part of the TRACCC project" ) + +# Declare where to get Thrust from. +set( TRACCC_CCCL_SOURCE + "GIT_REPOSITORY;https://github.com/stephenswat/cccl.git;GIT_TAG;build/allow_installing_when_downstream" + CACHE STRING "Source for CCCL, when built as part of this project" ) +mark_as_advanced( TRACCC_CCCL_SOURCE ) +FetchContent_Declare( CCCL ${TRACCC_CCCL_SOURCE} ) + +# There are a few things to configure here... May not all be necessary but +# can't hurt. +set ( CCCL_ENABLE_INSTALL_RULES ON CACHE BOOL "Install CCCL as part of traccc." ) +set ( THRUST_ENABLE_INSTALL_RULES ON CACHE BOOL "Install Thrust as part of traccc." ) +set ( CUB_ENABLE_INSTALL_RULES ON CACHE BOOL "Install CUB as part of traccc." ) +set ( libcudacxx_ENABLE_INSTALL_RULES ON CACHE BOOL "Install libcudacxx as part of traccc." ) +set ( CCCL_ENABLE_LIBCUDACXX ON CACHE BOOL "Disable libcudacxx" ) +set ( CCCL_ENABLE_CUB ON CACHE BOOL "Enable CUB" ) +set ( CCCL_ENABLE_THRUST ON CACHE BOOL "Enable Thrust" ) +set ( CCCL_ENABLE_TESTING OFF CACHE BOOL "Disable CCCL tests" ) +set ( CCCL_ENABLE_EXAMPLES OFF CACHE BOOL "Disable CCCL examples" ) +set ( CCCL_ENABLE_BENCHMARKS OFF CACHE BOOL "Disable CCCL benchmarks" ) +set ( THRUST_ENABLE_TESTING OFF CACHE BOOL "Disable Thrust tests" ) +set ( THRUST_ENABLE_EXAMPLES OFF CACHE BOOL "Disable Thrust examples" ) +set ( THRUST_ENABLE_HEADER_TESTING OFF CACHE BOOL "Disable Thrust header testing" ) +set ( CUB_ENABLE_TESTING OFF CACHE BOOL "Disable CUB tests" ) +set ( CUB_ENABLE_EXAMPLES OFF CACHE BOOL "Disable CUB examples" ) +set ( CUB_ENABLE_HEADER_TESTING OFF CACHE BOOL "Disable CUB header testing" ) + +# Get it into the current directory. +FetchContent_MakeAvailable( CCCL ) diff --git a/extern/cccl/README.md b/extern/cccl/README.md new file mode 100644 index 0000000000..6073098650 --- /dev/null +++ b/extern/cccl/README.md @@ -0,0 +1,4 @@ +# Build Recipe for CCCL + +This directory holds a build recipe for building +[CCCL](https://github.com/NVIDIA/cccl) for this project. diff --git a/extern/thrust/CMakeLists.txt b/extern/thrust/CMakeLists.txt deleted file mode 100644 index 571c96231c..0000000000 --- a/extern/thrust/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -# TRACCC library, part of the ACTS project (R&D line) -# -# (c) 2021-2024 CERN for the benefit of the ACTS project -# -# Mozilla Public License Version 2.0 - -# CMake include(s). -cmake_minimum_required( VERSION 3.14 ) -include( FetchContent ) - -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - -# Tell the user what's happening. -message( STATUS "Building Thrust as part of the TRACCC project" ) - -# Declare where to get Thrust from. -set( TRACCC_THRUST_SOURCE - "GIT_REPOSITORY;https://github.com/NVIDIA/thrust.git;GIT_TAG;2.1.0" - CACHE STRING "Source for Thrust, when built as part of this project" ) -mark_as_advanced( TRACCC_THRUST_SOURCE ) -FetchContent_Declare( Thrust ${TRACCC_THRUST_SOURCE} ) - -# Options used in the build of Thrust. -set( THRUST_ENABLE_INSTALL_RULES TRUE CACHE BOOL - "Install Thrust together with this project" ) - -# Get it into the current directory. -FetchContent_MakeAvailable( Thrust ) diff --git a/extern/thrust/README.md b/extern/thrust/README.md deleted file mode 100644 index 6a5c7c00ff..0000000000 --- a/extern/thrust/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Build Recipe for Thrust - -This directory holds a build recipe for building -[thrust](https://github.com/NVIDIA/thrust) for this project.