Commit 6c0a33e
authored
fix(cmake): make CCCL::CUB an IMPORTED target to allow downstream export (#8330)
Previously, CCCL::CUB was created as an ALIAS for the non-IMPORTED
_CUB_CUB target. When downstream projects tried to install(EXPORT ...)
a target that links to CCCL::CUB, CMake would resolve the alias and
complain that _CUB_CUB was not in any export set:
CMake Error: install(EXPORT "fooTargets" ...) includes target "foo"
which requires target "_CUB_CUB" that is not in any export set.
Fix this by creating CCCL::CUB as an INTERFACE IMPORTED GLOBAL target
that links to CUB::CUB, mirroring the pattern already used by
CCCL::Thrust (created via thrust_create_target as IMPORTED GLOBAL).
Since CCCL::CUB is IMPORTED, CMake treats it as an external dependency
and does not require it to be included in downstream export sets.
Fixes #80691 parent cf1a8ef commit 6c0a33e
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | 70 | | |
73 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| |||
0 commit comments