Commit Graph

6 Commits

Author SHA1 Message Date
Stephen Kelly df4d2b28b2 Make it an error for INSTALL_PREFIX to be evaluated.
An empty string is not likely going to produce expected results
in any evaluation context. It is replaced by preprocessing
currently.
2013-01-31 17:27:06 +01:00
Stephen Kelly b0c8f73eb6 Add the TARGET_NAME generator expression.
It will be used as a preprocessing marker.
2013-01-05 01:05:09 +01:00
Stephen Kelly 07749e3705 Genex: Ensure that $<0:...> has a parameter. 2012-11-27 09:12:39 -05:00
Stephen Kelly b3d8f5dab7 GenEx: Parse comma after colon tokens specially
Otherwise the comma is treated as plain text by ParseContent.

$<STREQUAL:,> should be valid and true.
$<STREQUAL:,something> should be valid and false.

$<STREQUAL:,,> should be non-valid as it is 3 parameters.
$<STREQUAL:something,,> should be non-valid as it is 3 parameters.

Additionally, this allows reporting the correct error for other
expressions. For example $<TARGET_PROPERTY:,> should be invalid
because it has an empty target and empty property. It shouldn't
attempt to read the property ',' on the 'implicit this' target.
2012-10-09 08:26:43 -04:00
Brad King 9d9f616792 Add $<CONFIG:...> boolean query generator expression
This expression evaluates to '1' or '0' to indicate whether the build
configuration for which the expression is evaluated matches tha named
configuration.  In combination with the "$<0:...>" and "$<1:...>"
expressions this allows per-configuration content to be generated.
2012-08-15 11:44:49 -04:00
Brad King ebf05abda1 Add boolean generator expressions
Add generator expressions that combine and use boolean test results:

 $<0:...>         = empty string (ignores "...")
 $<1:...>         = content of "..."
 $<AND:?[,?]...>  = '1' if all '?' are '1', else '0'
 $<OR:?[,?]...>   = '0' if all '?' are '0', else '1'
 $<NOT:?>         = '0' if '?' is '1', else '1'

These will be useful to evaluate (future) boolean query expressions and
condition content on the results.  Include tests and documentation.
2012-08-15 11:44:49 -04:00