# General - [x] Bump minimum CMake version for developer build to 3.21. Enables `cmake_path` and other QoL fixes. Does not affect user packages (CPM, `find_package`, and `add_subdirectory` usecases are unaffected and remain at 3.15). - [x] Write CCCL monorepo top layer CMakeLists.txt. - [x] Update subproject minimum CMake version for developer builds. - [x] Enable `TOPLEVEL` subproject logic when using when included from CCCL monorepo builds. - [x] Verify/update subproject install rules. - [x] Verify/update subproject CMake package configs. - [x] Update user docs to reflect changes to configuration options. # Use native CMake support for CUDA: - [x] Remove nvc++ hacks from Thrust/CUB CMake implementation - [x] Rewrite architecture logic to use `CMAKE_CUDA_ARCHITECTURES` instead of per-arch boolean options. - [x] Update logic for setting architectures on RDC vs non-RDC builds. - [x] Set CUDA architecture and RDC state using per-target properties, rather than directory-wide modifications to `CMAKE_CUDA_FLAGS`. - [x] Replace the existing RDC enable/disable options with `${PROJ}_ENABLE_RDC_TESTS` (enables tests/examples that *require* RDC) and `${PROJ}_FORCE_RDC` (Enable RDC for all targets, except those that explicit test RDC=off). # CMake Package Implementation - [x] Create `cccl-config.cmake` and `cccl-config-version.cmake` in `${CCCL_SOURCE_DIR}/share/cmake/cccl/` - [x] Implement semantic version checks. - [x] Install the CCCL CMake package to `${CMAKE_INSTALL_LIBDIR}/cmake/cccl` - [x] `find_package(CCCL)` finds all subprojects using existing subproject infrastructure. - [x] `find_package(CCCL COMPONENTS [Thrust] [CUB] [libcudacxx])` only loads requested components and their dependencies using existing subproject infrastructure. - [x] `add_subdirectory(${CCCL_SOURCE_DIR})` is effectively identical to `find_package(CCCL)` for users. - [x] `CCCL_REQUIRED_COMPONENTS` and `CCCL_OPTIONAL_COMPONENTS` variables equivalent to the `COMPONENT` options in `find_package`. - [x] `add_subdirectory` will continue to work directly on subproject directories (i.e. `add_subdirectory(${CCCL_SOURCE_DIR}/thrust)` is equivalent to `find_package(CCCL COMPONENT Thrust)`). This will reuse existing infrastructure. - [x] `find_package(Thrust|CUB|libcudacxx)` will continue to work using existing infrastructure. # CMake Package Testing - [x] Add automated tests for validating `find_package(CCCL [COMPONENTS Thrust|CUB|libcudacxx])` for both installed CCCL and the source repo. - [x] Add automated tests for validating `find_package(Thrust|CUB|libcudacxx)` for both installed CCCL and the source repo. - [x] Add automated tests for validating `add_subdirectory` usecase for CCCL and all subprojects, source tree only. - [x] Add automated tests for validating the `CCCL_(REQUIRED|OPTIONAL)_COMPONENTS` options for `add_subdirectory`. # Next Steps After the monorepo is in place, the following tasks are worth considering: - Explore costs/benefits of using rapids-cmake across all projects. - Move shared infra to the CCCL repo (Thrust/CUB have a lot of redundant CMake infra). - Move Thrust/CUB/libcudacxx cmake packages into the same location as the CCCL package. - Further CDP/RDC cleanup -- `FORCE_RDC` should be able to build with RDC on all arches, but the CDP tests require restricted arches. This will also involve updating our CUDA/C++ implementations. ### Thrust - [ ] https://github.com/NVIDIA/cccl/issues/97 - [x] Update libcudacxx dependency to always require the same version as Thrust ### Tasks - [x] Update libcudacxx dependency to always require the same version as CUB