Skip to content

rapids_find_generate_module: Support a custom TARGET_NAME#1027

Closed
chuckatkins wants to merge 4 commits into
rapidsai:mainfrom
chuckatkins:generate-find-import-target
Closed

rapids_find_generate_module: Support a custom TARGET_NAME#1027
chuckatkins wants to merge 4 commits into
rapidsai:mainfrom
chuckatkins:generate-find-import-target

Conversation

@chuckatkins
Copy link
Copy Markdown

Description

rapids_find_generate_module: Support a custom TARGET_NAME

Useful when a project has both a CMake and non-CMake build and the package config file for the CMake build creates a different target than <PackageName>::<PackageName> (e.g. <PackagName>::<package_name>). Using the TARGET_NAME argument allows the generated find module to locate the non-CMake build produce the same output as locating the CMake build with and importing it's CMake package config.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
  • The cmake-format.json is up to date with these changes.
  • I have added new files under rapids-cmake/
    • I have added include guards (include_guard(GLOBAL))
    • I have added the associated docs/ rst file and update the api.rst

The existing INITIAL_CODE_BLOCK and FINAL_CODE_BLOCK arguments are
populated before the any find_path or find_library calls and after
target creation respectively. This introduces a new PRE_FPHSA_CODE_BLOCK
argument that gets populated after the find_* calls but before
find_package_handle_standard_args. The new argument is particulary useful
for providing things like custom code to parse version information from
header files for find_package_handle_standard_args to consider.
Useful when a project has both a CMake and non-CMake build and the
package config file for the CMake build creates a different target than
<PackageName>::<PackageName> (e.g. <PackagName>::<package_name>), so
using the generated find module to find the non-CMake build will
produce the same output as finding the CMake package config.
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 21, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@chuckatkins chuckatkins deleted the generate-find-import-target branch May 21, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant