summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorExpression
Commit message (Collapse)AuthorAgeFilesLines
* Cygwin: Avoid legacy warnings in RunCMake.* testsBrad King2013-08-131-1/+1
| | | | | | Set the minimum required version of CMake high enough to avoid the warning for CMAKE_LEGACY_CYGWIN_WIN32. The warning appears on stderr and breaks the expected output matching.
* Make it an error for INSTALL_PREFIX to be evaluated.Stephen Kelly2013-01-314-0/+14
| | | | | | An empty string is not likely going to produce expected results in any evaluation context. It is replaced by preprocessing currently.
* Add the TARGET_NAME generator expression.Stephen Kelly2013-01-054-0/+13
| | | | It will be used as a preprocessing marker.
* Genex: Don't segfault on $<FOO,>Stephen Kelly2012-11-272-0/+10
| | | | | | Treat the comma as part of the identifier here. It will later not resolve to a generator expression and the user gets a proper error message.
* Genex: Ensure that $<0:...> has a parameter.Stephen Kelly2012-11-274-0/+14
|
* GenEx: Test early determination of AND and ORStephen Kelly2012-10-204-0/+20
| | | | | | | | | | | | | | | | It should be possible for example to do this: "$<AND:${FOO},$<BOOL:${TGT}>,$<BOOL:$<TARGET_PROPERTY:${TGT},PROP>" such that it works simliarly to the C code: if (foo && tgt && tgt->prop()) { } The example of generator expression code is a little bit contrived as it could be written other ways with the same functionality. Nevertheless, as these cases already work and are intentional, test for them.
* GenEx: Parse comma after colon tokens speciallyStephen Kelly2012-10-095-1/+47
| | | | | | | | | | | | | | | 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.
* cmGeneratorExpression: Re-write for multi-stage evaluationStephen Kelly2012-09-188-7/+136
| | | | | | | | The expressions may be parsed and then cached and evaluated multiple times. They are evaluated lazily so that literals such as ',' can be treated as universal parameter separators, and can be processed from results without appearing literally, and without interfering with the parsing/evaluation of the entire expression.
* Add $<CONFIG:...> boolean query generator expressionBrad King2012-08-154-0/+13
| | | | | | | 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.
* Add boolean generator expressionsBrad King2012-08-1511-0/+84
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.