rapids_cpm_thrust

Added in version v21.10.00.

Allow projects to find or build Thrust via CPM with built-in tracking of these dependencies for correct export support.

Uses the version of Thrust specified in the version file for consistency across all RAPIDS projects.

Deprecated since version v24.04.00: rapids_cpm_thrust uses Thrust 1.x. Users should migrate to rapids_cpm_cccl which uses CCCL 2.x, including new versions of Thrust, CUB, and libcudacxx.

rapids_cpm_thrust( NAMESPACE <namespace>
                   [BUILD_EXPORT_SET <export-name>]
                   [INSTALL_EXPORT_SET <export-name>]
                   [<CPM_ARGS> ...])
NAMESPACE

The namespace that the Thrust target will be constructed into.

BUILD_EXPORT_SET

Record that a CPMFindPackage() for Thrust is required in our build directory export set.

INSTALL_EXPORT_SET

Record that a find_dependency() for Thrust is required in our install directory export set.

Note

Installation of Thrust will occur if an INSTALL_EXPORT_SET is provided, and Thrust is added to the project via add_subdirectory by CPM.

CPM_ARGS

Any arguments after CPM_ARGS will be forwarded to the underlying Thrust CPMFindPackage`() call

Added in version v23.12.00: When BUILD_EXPORT_SET is specified the generated build export set dependency file will automatically call thrust_create_target(<namespace>::Thrust FROM_OPTIONS).

When INSTALL_EXPORT_SET is specified the generated install export set dependency file will automatically call thrust_create_target(<namespace>::Thrust FROM_OPTIONS).

Result Targets

<namespace>::Thrust target will be created

Result Variables

Thrust_SOURCE_DIR is set to the path to the source directory of Thrust. Thrust_BINARY_DIR is set to the path to the build directory of Thrust. Thrust_ADDED is set to a true value if Thrust has not been added before. Thrust_VERSION is set to the version of Thrust specified by the versions.json.