[CMake] Warning when find_package does not find package

Christoph Grüninger christoph.grueninger at iws.uni-stuttgart.de
Fri May 9 06:05:02 EDT 2014


Hi CMake fellows,
I have two pieces of software. Software A is an optional dependency of
B. Following the way CMake intends, A provides a a-config.cmake. B does
not have a FindB.cmake because A provides the config file [1]. B has a
UseB.cmake which calls find_package(A). This works well in the case A is
installed and found.

But if A is not installed, find_package generates an annoying and
disruptive warning message. I always check what went wrong to simply
find out, that I have not provided the path to A, just as I wanted.
I would prefer to get a single line stating "-- Could NOT find A"

I tried to use QUIET for find_package, but then I get no information at
all, even for the summary it is suppressed.

- Is the verbose warning emitted on purpose?
- Is there a workaround?
- Should I open a bug / write a patch?

Thanks for any hints,
Christoph

[1] http://www.cmake.org/pipermail/cmake/2011-April/043737.html

-- 
... as Sir Cyril Hinshelwood has observed ...fluid dynamicists
were divided into hydraulic engineers who observed things that
could not be explained and mathematicians who explained things
that could not be observed.                 -- James Lighthill
*********************************************
CMWR 2014: 10th - 13th June 2014 in Stuttgart
         Please visit www.cmwr14.de
*********************************************

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140509/16dea0cb/attachment.sig>


More information about the CMake mailing list