summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorExpression
Commit message (Collapse)AuthorAgeFilesLines
* Genex: Enable use of COMPILE_LANGUAGE for compile options.Stephen Kelly2015-03-094-0/+14
| | | | | | Follow-ups will allow the use of the generator expression for compile definitions and include directories for non-IDE generators.
* Genex: Add a COMPILE_LANGUAGE generator expression.Stephen Kelly2015-03-0722-0/+119
|
* RunCMake: Remove unneeded files.Stephen Kelly2015-02-091-1/+0
| | | | | The default expectation of RunCMake tests is empty content, so there is no need to specify it.
* Encoding: Modify tests to work using non-ascii paths.Clinton Stimpson2015-01-091-1/+1
| | | | | | | | | | For complex*, CustomCommand and OutDir tests, non-ascii paths are avoided in test code by using relative paths, and setting the working when running the test. This also avoids the need to internationalize the test code. For RunCMake.GeneratorExpression, use a UTF-8 encoding in file(STRINGS) to retrieve the compiled absolute path correctly.
* Genex: Implement generator expressions for target PDB files.Nils Gladitz2014-07-3110-0/+80
|
* Genex: Clarify error message on use with non-binary targets (#14899).Stephen Kelly2014-05-2919-0/+116
|
* Genex: Use case-sensitive comparison for COMPILER_ID.Stephen Kelly2014-01-084-0/+26
|
* Genex: Add a nullary form for CONFIGStephen Kelly2014-01-072-11/+1
| | | | | | | | | | | | | This is consistent with other similar expressions such as PLATFORM_ID, and makes the CONFIGURATION expression obsolete. Fix an off-by-one error in GeneratorExpressionContent::EvaluateParameters exposed by a unit test. Remove the test for 'bad' nullary use of $<CONFIG>. Add a unit test to verify that $<CONFIG> and $<CONFIGURATION> have the same value.
* Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)Brad King2013-11-015-0/+35
| | | | | | | | | Teach the cmGeneratorExpressionEvaluator filesystem artifact logic to reject OBJECT_LIBRARY targets since they have no main artifact. Without the explicit rejection evaluation falls through to an internal CMake error message in cmTarget::GetOutputInfo. Extend the RunCMake.GeneratorExpression test to cover these cases.
* 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.