[cmake-developers] Patch: Don't emit warning when config file not found

Brad King brad.king at kitware.com
Wed Aug 10 09:17:01 EDT 2016


On 08/09/2016 04:35 PM, Christoph Grüninger wrote:
> I am annoyed by the lengthy and disturbing warning CMake emits when a
> package is not found because neither a Find*.cmake file is found nor a
> *config.cmake file. I always try to have zero warnings, but missing
> dependencies is common. Emitting a warning is too much and too noisy in
> my opinion.
> 
> Please find attached patch, which reduces the warning to a single line
> with the status that the package was not found.

We went through many iterations on the wording of that message in
response to user feedback before settling on what is currently there.
When someone wants a package to be found they need a good explanation
when it is not and hints about how to resolve the problem.

If a dependency is optional and it is not a problem to be missing
then the project can use the find_package QUIET option and then
optionally add its own message() about the missing package.

-Brad


More information about the cmake-developers mailing list