I don't think this conditional stuff in generator expressions is a good
idea at all.

It's going to be ugly and very hard to read, and make people hate the CMake
language even more than they already do.

If there's any way at all that supports what we want but does not require
conditionals, then we should go with that way instead.


Or maybe I'm just getting old...?


On Thu, May 17, 2012 at 10:49 AM, Brad King <brad.k...@kitware.com> wrote:

> On 05/17/2012 10:31 AM, Stephen Kelly wrote:
> >> We may not need the "else" part but we still need a strict and
> extensible
> >> syntax to delimit the value in the "..." part above.
> >
> > not certain what you have in mind with 'extensible' or if you have any
> ideas
> > of how it might need to be extended.
>
> The structure so far is
>
>  $<IF(${cond})...>
>
> the ${cond} part we are saying is the CMake language IF expression syntax.
> However, after the ')' in the normal language comes other commands with
> known syntax.  In the generator expression case the "..." contains a
> *value*.
> I don't think it is so readable though:
>
>  $<IF(${cond})${value}>
>
> Perhaps something like
>
>  $<IF(${cond}) THEN(${value})>
>
> Also, what if ${cond} or ${value} has a '>' in it?  All previous generator
> expressions have very limited content inside $<>.  Now we're talking about
> arbitrary content.  We need encoding, escaping, etc.  It is a can of worms.
>
> > Yes. My idea is based on the properties with generator expressions not
> being
> > so convenient to edit at runtime as in the example I gave before, but
> > providing this API to wrap the less convenient 'generator containing a
> > boolean expression' elements.
> >
> > But indeed, this alone does not solve the problem of creating a strict
> > enough syntax for storage of the properties.
>
> Let's start with the generator expression part and consider helpers later.
>
> -Brad
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to