Added in version v21.10.00.

Overrides the rapids_cpm_find(), rapids_cpm_*, CPM, and FetchContent() package information for the project.


Allows projects to override the default values for any rapids_cpm_find(), rapids_cpm_*, CPM, and FetchContent() package.

The user provided json file must follow the versions.json format, which is documented here and shown in the below example:

  "packages": {
    "Thrust": {
      "version": "1.12.0",
      "git_url": "https://github.com/NVIDIA/thrust.git",
      "git_tag": "${version}",
      "git_shallow": true,
      "always_download": true,
      "exclude_from_all": false

By default when an override for a project is provided no local search for that project will occur. This is done to make sure that the requested modified version is used.

If a project is listed in multiple override files, the first file values will be used, and all later calls for that packaged will be ignored. This “first to record, wins” approach is used to match FetchContent, and allows parent projects to override child projects.

Added in version v24.06.00.

If the variable RAPIDS_CMAKE_CPM_OVERRIDE_VERSION_FILE is specified it will be used in all calls to rapids_cpm_init. Any existing explicit OVERRIDE files will be ignored, and all other calls will be treated as if this file was specified as the override.


Added in version v23.10.00: When the variable CPM_<package_name>_SOURCE exists, any override entries for package_name will be ignored.


If the override file doesn’t specify a value or package entry the default version will be used.

Must be called before any invocation of rapids_cpm_find().