I couldn’t find a documentation page specifying how to arrive from a module name, e.g.
FindCUDAToolkit to the proper syntax of calling
find_package(CUDAToolkit) in this case. I’m I missing something? If not, can it be added to documentation?
Initially, I asked that question on stackoverflow https://stackoverflow.com/questions/65713975
A “find module” is a
Find<PackageName>.cmake file to be loaded by the find_package() command when invoked for
A FindFoo.cmake module will typically be loaded by the command:
[EXACT] [QUIET] [REQUIRED]
Does that cover it?
Yes, it does, but you have to know where to look for it. For a newbie like me, it would help to have this repeated or linked to on
find_package() page: https://cmake.org/cmake/help/latest/command/find_package.html
On second reading, technically this information is on
find_package() page, but it’s not straightforward to uncover for a beginner. I think the main problem for me was that page https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html calls
FindCUDAToolkit a script and has no reference to
I think enhancing the
find_package docs would be the way to go here. Wanting to use module
find_package, one could expect that the
find_package docs would be of interest. Adding "use via
find_package(X)" feels like adding "use via
include(X)" to other module documentation.
Cc: @kyle.edwards @betsy.mcphail