You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] rapids_cpm_find(... DOWNLOAD_ONLY ON) writes an empty find_package redirect #1113
Describe the bug
Since #1089, rapids_cpm_find translates DOWNLOAD_ONLY into SOURCE_SUBDIR .rapids-cmake-download-only/<name>. CPM only skips writing its find_package redirect when DOWNLOAD_ONLY is set, so every download-only package now gets an empty <name>-config.cmake stub in CMAKE_FIND_PACKAGE_REDIRECTS_DIR. Every later find_package(<name>) in the build reports the package as found but defines no targets, including calls made by other projects' package configs.
This breaks Velox with cuDF enabled: cuDF fetches xxhash with DOWNLOAD_ONLY, and FBThrift's config later calls find_package(Xxhash MODULE) expecting its own FindXxhash.cmake to create Xxhash::xxhash. The stub answers instead and generation fails (facebookincubator/velox#19909). The same applies to cuDF's dlpack, and rapids_cpm_bs_thread_pool (which passes the placeholder SOURCE_SUBDIR directly) also writes a bs_thread_pool stub.
Steps/Code to reproduce bug
include(${rapids-cmake-dir}/cpm/init.cmake)
include(${rapids-cmake-dir}/cpm/find.cmake)
rapids_cpm_init()
set(CPM_DOWNLOAD_dlpack ON)
rapids_cpm_find(dlpack1.3CPM_ARGSGIT_REPOSITORYhttps://github.com/dmlc/dlpack.gitGIT_TAGv1.3DOWNLOAD_ONLYON)
# Exists on 26.10+, absent before #1089message(STATUS"${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}/dlpack-config.cmake")
Expected behavior DOWNLOAD_ONLY packages don't register a find_package redirect, as before #1089. A later find_package(<name> MODULE) should still reach the caller's own Find<name>.cmake.
Environment details (please complete the following information):
rapids-cmake 26.10 and main
CMake 4.x
Additional context
xref NVIDIA/cudf#25124, which works around this for xxhash only. rapids_cpm_cccl already suppresses the redirect the same way (#997).
Activity