[cmake-developers] conditionals in generator expressions
Brad King
brad.king at kitware.com
Mon Sep 3 11:09:37 EDT 2012
On 08/31/2012 07:21 AM, Stephen Kelly wrote:
> The above is not necessary. It can instead be literally:
>
> "$<$<CONFIG:Debug>:-Wl,no-undefined>"
> "$<$<AND:$<CONFIG:Debug>,$<STREQUAL:$<TGT_PROP:FOO>,b>>:-Wl,no-undefined>"
>
> The comma is ambiguous to the parser, but not to the generator expression.
> I've updated my -refactor branch to deal with it.
Okay. The branch looks like a good start so far. It will need to
be re-formatted into a clean patch series but let's focus on the
net change for now.
> my preference is to keep the existing design in next, and add something
> similar to the parser now in my branch.
Okay. The "always-:" syntax leaves the door open for the
whitespace/quoting approach in the future anyway.
In your branch why do you create separate helper classes for each
expression type but then use manual dispatch while evaluating the
parse tree? Doesn't this beg for virtual dispatch during eval?
Thanks,
-Brad
More information about the cmake-developers
mailing list