Want ability to make find_package more verbose
With some find-scripts, when the package is found, we get a message mentioning the version, and possibly other information:
-- Found CUDAToolkit: /usr/local/cuda/targets/x86_64-linux/include (found suitable version "11.2.67", minimum required is "9.0")
However, in CONFIG
mode - find_package()
itself will not issue such a message, AFAICT, ever. There is no parameter/modified one can pass on to find_package
for ensuring this notice is printed. IMHO, there should be! We have QUIET, to ensure nothing is said; Why not the opposite?
The simplest would be a VERBOSE
which mentions the version found and the minimum required version, or required range, if one was specified. One could be more fancy and also print some location info, but perhaps better not to go there. So, for:
find_package(foo 11.2 11.0..<11.3)
we would get something like:
-- Found Foo (version "11.2.67", minimum required is "11.0")
Edited by Eyal Rozenberg