summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorExpression
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate compatibility with CMake versions older than 3.5Brad King2023-02-111-0/+1
| | | | | | | | Issue a deprecation warning on calls to `cmake_minimum_required` or `cmake_policy` that set policies based on versions older than 3.5. Note that the effective policy version includes `...<max>` treatment. Update the check from commit 5845c218d7 (Deprecate compatibility with CMake versions older than 2.8.12, 2020-06-12, v3.19.0-rc1~629^2).
* Genex: $<CONFIG:> syntax of all entries checkedRobert Maynard2023-01-202-0/+10
| | | | Fixes #24327
* GeneratorExpression Tests: Remove duplicate test entryRobert Maynard2023-01-171-1/+0
|
* Tests: Move some cases to RunCMake.GenEx-TARGET_PROPERTYBrad King2022-11-1511-88/+0
| | | | Move some `TARGET_PROPERTY` cases from `RunCMake.GeneratorExpression`.
* cmTargetPropertyComputer: Simplify by restoring use of cmMakefileBrad King2021-12-081-5/+1
| | | | | | | | | | | Logically revert commit 390a7d8647 (cmTargetPropertyComputer: Implement GetProperty without cmMakefile, 2016-10-13, v3.8.0-rc1~445^2~9). It relied on using `cmListFileBacktrace` to get a scope in which to look up policies. This does remove a backtrace from `LOCATION` property errors at generate time, but the backtrace we reported before was incorrect. It pointed at the addition of a target, not to the reference to the property.
* Add deprecation warnings for policies CMP0088 and belowBrad King2021-06-301-0/+8
| | | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.14 and below to encourage projects to port away from setting policies to OLD.
* genex: improve unit testing for $<TARGET_NAME_IF_EXISTS:...>Asit Dhal2020-10-247-0/+34
| | | | Fixes: #19696
* Genex: $<TARGET_PROPERTY> strip emtpy list elements for predefined propertiesMarc Chevrier2020-07-212-1/+23
| | | | Fixes: #20951
* Merge topic 'config_genex_support_multiple_types'Brad King2020-06-267-10/+43
|\ | | | | | | | | | | | | | | eae15dce6a Genex: $<CONFIG:> now supports multiple configurations c4cc21d20b cmVisualStudio10TargetGenerator: Do not segfault on empty config Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4924
| * Genex: $<CONFIG:> now supports multiple configurationsRobert Maynard2020-06-247-10/+43
| | | | | | | | | | Instead of having to do $<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>> you can do $<CONFIG:Release,MinSizeRel>
* | Tests/RunCMake: Update cmake_minimum_required versionsBrad King2020-06-181-1/+1
|/ | | | Use 3.3 or 2.8.12 where possible.
* Tests: Factor out RunCMake.GenEx-GENEX_EVAL testBrad King2020-06-1626-220/+0
| | | | Move the `GENEX_EVAL` cases and friends out of `RunCMake.GeneratorExpression`.
* Tests: Factor out RunCMake.GenEx-TARGET_FILE testBrad King2020-06-1671-802/+0
| | | | Move the `TARGET_FILE` cases and friends out of `RunCMake.GeneratorExpression`.
* Tests: Factor out RunCMake.GenEx-DEVICE_LINK testBrad King2020-06-1640-195/+0
| | | | Move the `DEVICE_LINK` cases out of `RunCMake.GeneratorExpression`.
* Tests: Factor out RunCMake.GenEx-HOST_LINK testBrad King2020-06-1640-195/+0
| | | | Move the `HOST_LINK` cases out of `RunCMake.GeneratorExpression`.
* Tests: Factor out RunCMake.GenEx-LINK_LANG_AND_ID testBrad King2020-06-1635-171/+0
| | | | Move the `LINK_LANG_AND_ID` cases out of `RunCMake.GeneratorExpression`.
* Tests: Factor out RunCMake.GenEx-LINK_LANGUAGE testBrad King2020-06-1638-183/+0
| | | | Move the `LINK_LANGUAGE` cases out of `RunCMake.GeneratorExpression`.
* Tests: Factor out RunCMake.GenEx-COMPILE_LANG_AND_ID testBrad King2020-06-1623-115/+0
| | | | Move the `COMPILE_LANG_AND_ID` cases out of `RunCMake.GeneratorExpression`.
* Tests: Factor out RunCMake.GenEx-COMPILE_LANGUAGE testBrad King2020-06-1623-108/+0
| | | | Move the `COMPILE_LANGUAGE` cases out of `RunCMake.GeneratorExpression`.
* add_library/add_executable: allow local alias to imported targetsMarc Chevrier2020-06-023-0/+23
| | | | Fixes: #20641
* Genex: Add generator expressions $<DEVICE_LINK> and $<HOST_LINK>Marc Chevrier2020-04-1979-0/+390
| | | | | | These generator expressions can only be used in link options properties. These expressions return the arguments respectively for device and host link step, otherwise return an empty string.
* Genex: Add $<LINK_LANGUAGE:...> and $<LINK_LANG_AND_ID:...>Marc Chevrier2020-02-2672-0/+354
| | | | | | This MR may help to solve issues #19757 and #18008 Fixes: #19965
* AIX: Create import library for executables with exportsBrad King2019-07-164-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AIX, plugins meant to be loaded into executables via `dlopen` must be linked with access to a list of symbols exported from the executable in order to use them (when not using runtime linking). The AIX linker supports specifying this list as an "import file" passed on the command line either via the `-bI:...` option or (with a leading `#! .` line) as a normal input file like any other library file. The linker import file plays the same role on AIX as import libraries do on Windows. Teach CMake to enable its import library abstraction on AIX for executables with the `ENABLE_EXPORTS` target property set. Teach our internal `ExportImportList` script to optionally generate a leading `#! .` line at the top of the generated export/import list. Update our rule for linking an executable with exports to generate a public-facing "import library" implemented as an AIX linker import file. With this approach, our existing infrastructure for handling import libraries on Windows will now work for AIX linker import files too: * Plugins that link to their executable's symbols will be automatically linked using the import file on the command line. * The executable's import file will be (optionally) installed and exported for use in linking externally-built plugins. This will allow executables and their plugins to build even if we later turn off runtime linking. Issue: #19163
* Genex: CompileLang and CompileLangAndId now match against a list of idsRobert Maynard2019-06-032-4/+2
| | | | | | This allows for expressions such as: $<COMPILE_LANG_AND_ID, CXX, GNU, Clang>
* Genex: Fix value lifetimes in nested TARGET_PROPERTY evaluationBrad King2019-05-222-0/+19
| | | | | | | | | | | For special properties like `INCLUDE_DIRECTORIES`, the pointer returned by `cmTarget::GetProperty` is only valid until the next time the same special property is queried on *any* target. When evaluating a nested `TARGET_PROPERTY` generator expression we may look up such a property more than once on different targets. Fix `TargetPropertyNode::Evaluate` to store the lookup result in locally owned memory earlier. Fixes: #19286
* Merge topic 'offer_compiler_lang_generator_expression'Brad King2019-05-1723-0/+117
|\ | | | | | | | | | | | | | | e214abdaab Genex: Add COMPILE_LANG_AND_ID generator expression f84ed796a2 Docs: Generator-expressions remove usage of `CMake-id` Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3300
| * Genex: Add COMPILE_LANG_AND_ID generator expressionRobert Maynard2019-05-1423-0/+117
| |
* | cmake: Display error if generate step failsKyle Edwards2019-05-136-6/+18
|/
* Genex: Update $<TARGET_FILE_BASE_NAME:...>: take care of POSTFIXMarc Chevrier2019-05-023-5/+71
| | | | | This capability complement MR !3190 and !3207 and is also needed to solve issue #18771.
* Genex: Rename $<TARGET_*_OUTPUT_NAME:...> in $<TARGET_*_FILE_BASE_NAME:...>Marc Chevrier2019-04-1533-176/+176
|
* Genex: add $<TARGET_FILE_PREFIX:...> and $<TARGET_FILE_SUFFIX:...>Marc Chevrier2019-04-1025-6/+270
| | | | | These capabilities complement MR !3190 and is also needed to solve issue #18771.
* Genex: Add $<FILTER:list,INCLUDE|EXCLUDE,regex>Sebastian Lipponer2019-04-0810-0/+45
|
* Genex: Add capability to retrieve base name for various target artifactsMarc Chevrier2019-04-0825-1/+306
| | | | This new capability is required to solve efficiently issue #18771
* Genex: Add $<REMOVE_DUPLICATES:list>Sebastian Lipponer2019-04-0111-0/+50
|
* Genex: Teach SHELL_PATH to support a list of pathsHenri Manson2019-03-112-0/+10
| | | | | | | Extend the genex added by commit ca6ba3fee5 (Genex: Add a SHELL_PATH expression, 2015-09-24, v3.4.0-rc1~37^2) to accept a `;`-list of paths, convert them all, and generate a list separated by the native shell `PATH``` separator.
* genex: Fix erroneous handling of recursion for $<GENEX_EVAL:>Marc Chevrier2019-02-132-4/+5
| | | | Fixes: #18894
* Fortran: Add compiler ID/Version generator expressionsAndrew Paprocki2019-01-187-0/+30
| | | | | | | | | | | | Adds `Fortran_COMPILER_ID` and `Fortran_COMPILER_VERSION` generator expression support to match equivalent `C_COMPILER_ID`, `CXX_COMPILER_ID`, `C_COMPILER_VERSION`, and `CXX_COMPILER_VERSION` support. This is very helpful in the case where the C/C++ compiler suite is a different type of compiler from the platform Fortran compiler and projects use generator expressions to assign compiler flags and definitions. (e.g. `GNU` C/C++ and `SunPro` Fortran on Linux)
* Genex: Add policy to handle empty list items in $<IN_LIST:...>Kyle Edwards2018-11-198-0/+73
| | | | | | | | | | The old behavior of $<IN_LIST:...> is inconsistent with that of if(IN_LIST), in that it does not find an empty search item even if the list contains empty items. This change adds a new policy to correctly handle empty items and make the behavior more consistent with if(IN_LIST). Fixes: #18556
* Genex: Allow COMPILE_LANGUAGE to name a language that is not loadedHenry Schreiner2018-05-033-10/+1
| | | | | | | | Evaluate to false on `$<COMPILE_LANGUAGE:Lang>` if language `Lang` is not loaded. This is helpful in exported targets consumed in other projects that may not enable all the same languages. Fixes: #17952
* Genex: Add $<TARGET_GENEX_EVAL:...> and $<GENEX_EVAL:...>Marc Chevrier2018-04-2326-0/+219
| | | | Fixes: #17884
* genex: Add TARGET_NAME_IF_EXISTS expressionAlex Turbov2018-03-2811-0/+43
| | | | | Define `$<TARGET_NAME_IF_EXISTS:tgt>` to mean `tgt` if the target exists and otherwise an empty string.
* genex: Add TARGET_EXISTS to check for target existenceAlex Turbov2018-03-0911-0/+43
| | | | | Define `$<TARGET_EXISTS:a>` to `1` if `a` is an existed target name, else `0`.
* Tests: Speed up RunCMake.GeneratorExpressionBrad King2018-01-2525-71/+30
| | | | Avoid enabling languages in cases that do not need them.
* GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in TestsCraig Scott2017-12-291-1/+2
|
* VS,Xcode: Add CMakeLists.txt sources without mutating targetsBrad King2017-10-181-3/+0
| | | | | | | | | | | | Rather than injecting `CMakeLists.txt` files into each target's `SOURCES`, teach the generators to add them during generation using dedicated code. This avoids mutating the original targets, and avoids polluting `$<TARGET_PROPERTY:foo,SOURCES>` with generator-specific content. This also avoids listing the `CMakeLists.txt` sources in the results of `CMAKE_DEBUG_TARGET_PROPERTIES==SOURCES` so the `RunCMake.TargetSources` test no longer needs a separate case for IDEs.
* Merge topic 'fix-genex-SOURCES'Brad King2017-09-015-0/+15
|\ | | | | | | | | | | | | 068cc545 Genex: Fix TARGET_PROPERTY value of SOURCES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1218
| * Genex: Fix TARGET_PROPERTY value of SOURCESBrad King2017-09-015-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | cmGeneratorExpressionNode: add some missing commasBen Boeckel2017-08-037-14/+14
|/
* Genex: Add `TARGET_BUNDLE_[CONTENT_]_DIR` generator expressionsGregor Jasny2017-03-3013-0/+62
| | | | Closes #16733
* Genex: Add `IF` generator expressionColby Pike2017-01-264-0/+22
| | | | | | | | 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