New in version v21.06.00.
Generate a Find*.cmake module for the requested package
rapids_find_generate_module( <PackageName> HEADER_NAMES <paths...> [LIBRARY_NAMES <names...>] [INCLUDE_SUFFIXES <suffixes...>] [VERSION <version>] [NO_CONFIG] [BUILD_EXPORT_SET <name>] [INSTALL_EXPORT_SET <name>] )
Generates a custom Find module for the requested package. Makes it easier for projects to look for packages that don’t have an existing FindModule or don’t provide a CONFIG module when installed.
If you are using this for a module that is part of your BUILD or INSTALL export set, it is highly likely that this needs to be part of the same export sets.
Header names that should be provided to
find_path()to determine the include directory of the package. If provided a list of names only one needs to be found for a directory to be considered a match
library names that should be provided to
find_library()to determine the include directory of the package. If provided a list of names only one needs to be found for a directory to be considered a match
Every entry that doesn’t start with lib will also be searched for as lib<name>
Extra relative sub-directories to use while searching for HEADER_NAMES.
Will append extra entries of the library to search for based on the content of LIBRARY_NAMES:
This ordering is done explicitly to follow CMake recommendations for searching for versioned libraries:
“We recommend specifying the unversioned name first so that locally-built packages can be found before those provided by distributions.”
When provided will stop the generated Find Module from first searching for the projects shipped Find Config.
Record that this custom FindPackage module needs to be part of our build directory export set. This means that it will be usable by the calling package if it needs to search for <PackageName> again.
Record that this custom FindPackage module needs to be part of our install export set. This means that it will be installed as part of our packages CMake export set infrastructure
CMAKE_MODULE_PATHwill be modified to include the folder where Find<PackageName>.cmake is located.