[cmake-developers] Setting ExactCase_FOUND in FPHSA
Rolf Eike Beer
eike at sf-mail.de
Mon Feb 18 17:34:29 EST 2013
Am Montag, 18. Februar 2013, 17:17:40 schrieb Brad King:
> On 02/18/2013 04:52 PM, Stephen Kelly wrote:
> > Anyway, I don't agree with your conclusion, but I guess Brad gets the
> > casting vote of doing nothing or not. I understand your position and you
> > understand mine I'm sure. All that's needed is to decide :).
>
> One thing that has always bothered me about FPHSA is that modules
> using it have no mention of a _FOUND variable in the call to it.
> It is just magically set under the hood. A module author needs
> to read FPHSA docs to know what _FOUND variable will be set.
>
> OTOH we already pass <pkg>_INCLUDE_DIR, <pkg>_LIBRARY, and other
> <pkg>_ variables to FPHSA:
>
> FPHSA(Foo DEFAULT_MSG FOO_INCLUDE_DIR FOO_LIBRARY)
>
> so that it can check if everything is found. Why not also pass
> in the name of the _FOUND variable e.g.
>
> FPHSA(Foo DEFAULT_MSG FOO_INCLUDE_DIR FOO_LIBRARY
> FOUND_VAR Foo_FOUND)
>
> ? Then it is clear when reading the call site what the _FOUND
> variable is called. It also makes it clearer when reading the
> module when _FOUND is set.
>
> This way the default behavior with no FOUND_VAR option can stay
> as it is now for compatibility. Then we just proliferate the
> convention of using the option.
One could even go so far and issue a dev warning in case FOUND_VAR is not
explicitely specified and the minimum required version is not 2.8.11 or 12.
Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130218/81d6399c/attachment.sig>
More information about the cmake-developers
mailing list