summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Genex: Fix TARGET_PROPERTY value of SOURCESBrad King2017-09-011-0/+1
| | | | | | | | | | | | Refactoring in commit v3.8.0-rc1~445^2~2 (cmTarget: Move sanity checks and computed property access to callers, 2016-10-13) exposed a typo in commit v3.8.0-rc1~445^2~3 (cmGeneratorTarget: Implement cmTargetPropertyComputer interface, 2016-10-13). Together they broke the `$<TARGET_PROPERTY:mytgt,SOURCES>` generator expression in the case that the `SOURCES` target property is populated in part by the `target_sources` command. Add the missing `;`-separator. Fixes: #17243
* Genex: Add `TARGET_BUNDLE_[CONTENT_]_DIR` generator expressionsGregor Jasny2017-03-301-0/+4
| | | | Closes #16733
* Genex: Add `IF` generator expressionColby Pike2017-01-261-0/+1
| | | | | | | | This allows a single condition to be used to choose between two alternatives. Without this the condition must be duplicated with one surrounded by `NOT`. Closes: #15585
* Genex: Diagnose invalid LINK_ONLY usage instead of crashingBrad King2016-09-051-0/+1
| | | | | | | | When `$<LINK_ONLY:...>` is used outside of linking we may evaluate it without a `dagChecker`. Do not dereference the NULL pointer and issue a diagnostic instead. Closes: #16287
* Fix crash on $<TARGET_PROPERTY:...,LOCATION> genex (#16134)Brad King2016-06-021-0/+1
| | | | | | | | | | | | | | | | | | Policy CMP0026 deprecated the LOCATION property, and we have long provided a $<TARGET_FILE:...> generator expression. However, if a project tries to use $<TARGET_PROPERTY:...,LOCATION> we should at least not crash. The compatibility implementation of the LOCATION property uses cmGlobalGenerator::CreateGenerationObjects to create the structures needed to evaluate the property before generation starts. The implementation assumed that accessing the property could only be done during configuration (via the typical get_property command use case). The $<TARGET_PROPERTY:...,LOCATION> genex causes the LOCATION property to be accessed during generation. Calling CreateGenerationObjects during generation blows away all the objects currently being used for generation and is not safe. Add a condition to call it only when configuration is not finished.
* Genex: Add a SHELL_PATH expressionStefan Kislinskiy2015-09-281-0/+1
| | | | | | | | | Some commands on Windows do not understand forward slash paths and require backslashes. In order to help projects generate shell invocations of such commands, provide a generator expression to convert paths to the shell-preferred path format for the current generator. This will allow custom commands to generate paths the same way CMake does for compiler command invocations.
* cmGeneratorTarget: Avoid recursion in GetOutputName methodRobert Goulet2015-08-201-0/+1
| | | | | | Since support for generator expressions was added to OUTPUT_NAME it is possible for project code to cause recursion in this method by using a $<TARGET_FILE> genex. Detect and reject such cases.
* Add generator expression support to OUTPUT_DIRECTORY target propertiesRobert Goulet2015-08-121-0/+1
| | | | | | | If {ARCHIVE,LIBRARY,RUNTIME}_OUTPUT_DIRECTORY is set with a genex then do not add the per-config subdirectory on multi-config generators. This will allow projects to use $<CONFIG> to place the per-config part of the directory path somewhere other than the end.
* Reject TARGET_PDB_FILE for imported targets instead of crashingBrad King2015-08-061-0/+1
| | | | Reported-by: Justin Borodinsky <justin.borodinsky@gmail.com>
* Tests: Add case for rejecting $<TARGET_FILE:...> on an INTERFACE libraryBrad King2015-05-261-0/+1
| | | | | Add an explicit test for this existing error. We already cover it for an OBJECT library but INTERFACE libraries are not allowed either.
* Genex: Enable use of COMPILE_LANGUAGE for compile options.Stephen Kelly2015-03-091-0/+1
| | | | | | 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-071-0/+7
|
* Genex: Implement generator expressions for target PDB files.Nils Gladitz2014-07-311-0/+7
|
* Genex: Clarify error message on use with non-binary targets (#14899).Stephen Kelly2014-05-291-0/+6
|
* Genex: Use case-sensitive comparison for COMPILER_ID.Stephen Kelly2014-01-081-0/+1
|
* Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)Brad King2013-11-011-0/+1
| | | | | | | | | 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.
* Make it an error for INSTALL_PREFIX to be evaluated.Stephen Kelly2013-01-311-0/+1
| | | | | | 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-051-0/+1
| | | | It will be used as a preprocessing marker.
* Genex: Ensure that $<0:...> has a parameter.Stephen Kelly2012-11-271-0/+1
|
* GenEx: Parse comma after colon tokens speciallyStephen Kelly2012-10-091-0/+1
| | | | | | | | | | | | | | | 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.
* Add $<CONFIG:...> boolean query generator expressionBrad King2012-08-151-0/+1
| | | | | | | 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-151-0/+5
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.