# CUDA CCCL integration

**URL:** https://discourse.cmake.org/t/cuda-cccl-integration/15229
**Category:** Code
**Tags:** lang:cuda
**Created:** [October 8, 2025, 8:17pm UTC](https://discourse.cmake.org/t/cuda-cccl-integration/15229 "2025-10-08T20:17:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jwm](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jwm/32/654_2.png) [@jwm](https://discourse.cmake.org/u/jwm)
#### Post date: [October 8, 2025, 8:17pm UTC](https://discourse.cmake.org/t/cuda-cccl-integration/15229/1 "2025-10-08T20:17:05Z")

</div>

I recently tried to upgrade my CUDA version from 12.8.0 to 13.1 (then dropped back to 12.9.1). Apparently I’ve been hit by the upgrade to the [CCCL](https://github.com/NVIDIA/cccl). My immediate symptom is that `<thrust/xxx>` is no longer found.

At the same time, I downgraded CMake to 3.26.5, since a package was available for RHEL9. If this is fixed in a later version, I can upgrade.

As usual, CUDA code compiled by `nvcc` builds just fine, but C++ code built by the native compiler (in my case g++ 13.3.1) can’t find the thrust headers.

It seems that I need to add `CCCL::CCCL` as a link-library to my target, but I haven’t come across any examples of how to just use it. I don’t understand why this isn’t part of

The CCCL has an [example project](https://github.com/NVIDIA/cccl/tree/main/examples/basic) that talks about including CCCL as an external project; I don’t need to do that, since it is part of the CUDA Toolkit in my [nvidia base image](https://hub.docker.com/layers/nvidia/cuda/13.0.1-devel-ubi9/images/sha256-c56c92cd85dae8482e1adbe98ec63931e60fa9197d28a42c8605b8c49329f018).

Can anyone (and I’m hoping @robert.maynard will read this) give me the “proper” way to add CCCL to a project that uses CUDA?

---

<div class="post-metadata">

### Author: ![LegalizeAdulthood](https://discourse.cmake.org/user_avatar/discourse.cmake.org/legalizeadulthood/32/5282_2.png) [@LegalizeAdulthood](https://discourse.cmake.org/u/LegalizeAdulthood)
#### Post date: [October 8, 2025, 9:41pm UTC](https://discourse.cmake.org/t/cuda-cccl-integration/15229/2 "2025-10-08T21:41:23Z")

</div>

Did you read through these instructions?

> <https://github.com/NVIDIA/cccl/blob/main/lib/cmake/thrust/README.md>

---

<div class="post-metadata">

### Author: ![jwm](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jwm/32/654_2.png) [@jwm](https://discourse.cmake.org/u/jwm)
#### Post date: [October 8, 2025, 9:46pm UTC](https://discourse.cmake.org/t/cuda-cccl-integration/15229/3 "2025-10-08T21:46:39Z")

</div>

I had not found _those_ instructions, but I stumbled into most of it. The

```auto
thrust_create_target(Thrust)

```

part I did not do (although I found it in the Thrust cmake file; I wasn’t sure what to do with it). That was the ticket. Thanks!

---

<div class="post-metadata">

### Author: ![robert.maynard](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert.maynard/32/4_2.png) [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)
#### Post date: [October 9, 2025, 1:41pm UTC](https://discourse.cmake.org/t/cuda-cccl-integration/15229/4 "2025-10-09T13:41:32Z")

</div>

Also see the CCCL migration guide: [CCCL 2.x ‐ CCCL 3.0 migration guide — CUDA Core Compute Libraries](https://nvidia.github.io/cccl/cccl/3.0_migration_guide.html#cuda-toolkit-changes)

---

<div class="post-metadata">

### Author: ![jwm](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jwm/32/654_2.png) [@jwm](https://discourse.cmake.org/u/jwm)
#### Post date: [October 9, 2025, 3:45pm UTC](https://discourse.cmake.org/t/cuda-cccl-integration/15229/5 "2025-10-09T15:45:53Z")

</div>

I did see that, but it was missing the critical README buried down in **cmake/lib/thrust** (I poked around that tree and that’s the only README down there).
