On 05/13/2012 05:50 PM, Stephen Kelly wrote:
> The remaining (I think) open question regards what form the generator 
> expressions should take so that they can represent multiple dimensions.

Multiple dimensions will inevitably need to be combined in arbitrary
boolean expressions.  I'm concerned that this will lead to a whole new
piece to the language that will be hard to get right without knowledge
of future use cases.  We will need to ensure that parsing of generator
expressions is *very* strict so we can extend the syntax easily later.

Perhaps the simplest thing to do is implement something like the normal
CMake IF() command in generator expressions.  Factor the IF() expression
evaluation out for re-use.  Teach the generator expression parser to
extract the IF() part (with nested $<> expressions already evaluated,
something the generator expression evaluator already knows how to do)
and pass it through the IF() evaluator.  For example:

  "$<IF($<CONFIGURATION> MATCHES Debug AND $<LANGUAGE> STREQUALS CXX)...>"

I'm not sure what should go in the "..." part though.  Some syntax to
delimit the then/else values would be needed.  Also the MATCHES test
is not case-insensitive, and the whole thing is quite verbose.  Ideas
welcome.

-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

Reply via email to