[cmake-developers] FindX11 change breaks complex test
Rolf Eike Beer
eike at sf-mail.de
Wed Aug 15 16:56:47 EDT 2012
Brad King wrote:
> On 08/15/2012 04:28 PM, Rolf Eike Beer wrote:
> > For the empty variable: it looks like an empty variable and a not existing
> > one are the same.
>
> They are not the same:
>
> $ cat var.cmake
> macro(report)
> if(DEFINED A)
> message("yes")
> else()
> message("no")
> endif()
> endmacro()
> set(A "")
> report()
> set(A)
> report()
>
> $ cmake -P var.cmake
> yes
> no
>
> > Is there a sane way to query this or should I just ignore it anyway?
>
> If mf->GetDefinition() returns NULL then the variable is not set.
> If it returns an empty string then the variable is empty.
So "set(result)" is something else then "set(result "")". Hmmm.
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/20120815/71a4bf13/attachment.sig>
More information about the cmake-developers
mailing list