rapids_cpm_cccl
Added in version v24.02.00.
Allow projects to find or build CCCL via CPM with built-in tracking of these dependencies for correct export support.
Uses the version of CCCL specified in the version file for consistency across all RAPIDS projects.
When BUILD_EXPORT_SET is specified the generated build export set dependency file will automatically call thrust_create_target(CCCL::Thrust FROM_OPTIONS).
When INSTALL_EXPORT_SET is specified the generated install export set dependency file will automatically call thrust_create_target(CCCL::Thrust FROM_OPTIONS).
rapids_cpm_cccl( [BUILD_EXPORT_SET <export-name>]
[INSTALL_EXPORT_SET <export-name>]
[EXCLUDE_FROM_ALL]
[ENABLE_UNSTABLE]
[<CPM_ARGS> ...])
ENABLE_UNSTABLEEnable unstable features in CCCL.
BUILD_EXPORT_SETRecord that a
CPMFindPackage()for CCCL is required in our build directory export set.INSTALL_EXPORT_SETRecord that a
find_dependency()for CCCL is required in our install directory export set.
Note
Installation of CCCL will occur if an INSTALL_EXPORT_SET is provided, and CCCL
is added to the project via add_subdirectory by CPM.
EXCLUDE_FROM_ALLWhen provided, marks the package as excluded from the
install()target. This overrides the default value from the versions.json configuration. WhenEXCLUDE_FROM_ALLis specified alongsideINSTALL_EXPORT_SET, the package will not be installed.CPM_ARGSAny arguments after CPM_ARGS will be forwarded to the underlying CCCL
CPMFindPackage`()call
Result Targets
CCCL::CCCL target will be created CCCL::Thrust target will be created CCCL::libcudacxx target will be created CCCL::CUB target will be created libcudacxx::libcudacxx target will be created CCCL::cudax target will be created (if ENABLE_UNSTABLE is specified)
Result Variables
CCCL_SOURCE_DIRis set to the path to the source directory of CCCL.CCCL_BINARY_DIRis set to the path to the build directory of CCCL.CCCL_ADDEDis set to a true value if CCCL has not been added before.CCCL_VERSIONis set to the version of CCCL specified by the versions.json.