[CMake] Warning when find_package does not find package

Christoph Grüninger christoph.grueninger at iws.uni-stuttgart.de
Fri May 9 07:22:50 EDT 2014


Hi Nils,
thanks for your answer. Your proposal is a valid work-around, but the
summary entry would remain missing.
In general I am more interested in directly fixing the problem in CMake.

Bye
Christoph

Am 09.05.2014 12:25, schrieb Nils Gladitz:
> On 05/09/2014 12:05 PM, Christoph Grüninger wrote:
> 
>> 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 guess you could have that easily enough with something similar to:
> 
>   find_package(A QUIET)
>   if(NOT A_FOUND)
>     message(STATUS "Could NOT find A")
>   endif()
> 
> Nils

-- 
... 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
*********************************************


More information about the CMake mailing list