[cmake-developers] conditionals in generator expressions

Stephen Kelly steveire at gmail.com
Thu Aug 30 04:02:50 EDT 2012


Brad King wrote:

> On 08/27/2012 05:38 AM, Stephen Kelly wrote:
>> Yes, I can see how the language could be able to offer both. However, I
>> do think that the built-in 'this' target should be the one that the
>> generator expression is evaluated on.
> 
> Okay.  I'd just like to reserve room in the syntax to allow the target
> to be specified explicitly in $<TARGET_PROPERTY:...>.  Ideas?

It's probably clear already from looking at the branch, but my idea is this:


  "  $<TARGET_PROPERTY:prop>   = The value of the property prop on\n"   \
  "the target on which the generator expression is evaluated.\n"        \
  "  $<TARGET_PROPERTY:tgt,prop>   = The value of the property prop\n"  \
  "the target tgt.\n"                                                   \

I've updated the branch to implement the TODO I had left there for this, but 
I haven't tested it. It shows the intent, even if it has a bug :). 

Thanks,

Steve.





More information about the cmake-developers mailing list