summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
Commit message (Collapse)AuthorAgeFilesLines
* HIP: Add language to CMakeRobert Maynard2021-06-071-2/+5
|
* cmGeneratorExpressionNode: Constify local variableBrad King2021-05-281-1/+1
|
* Genex: Fix grammatical error in TARGET_OBJECTS error messageKyle Edwards2021-02-241-2/+2
|
* Genex: Add TARGET_RUNTIME_DLLS genexKyle Edwards2021-02-241-0/+51
| | | | Co-Authored-by: Brad King <brad.king@kitware.com>
* Constify some code as suggested by clang-tidyCengizhan Pasaoglu2020-10-191-7/+7
|
* OBJECT libraries: Properly recognize if sources depend on configurationDeniz Bahadir2020-09-231-3/+2
| | | | Fixes: #21198
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-1/+1
|
* Merge topic 'target_genex_dependency'Brad King2020-09-011-2/+68
|\ | | | | | | | | | | | | | | f14b390198 GenEx: Remove unneeded dependencies from target info queries Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Raul Tambre <raul@tambre.ee> Merge-request: !5127
| * GenEx: Remove unneeded dependencies from target info queriesRobert Maynard2020-09-011-2/+68
| | | | | | | | | | | | | | | | | | | | Only generate a graph dependency between a custom command and a target when the custom command queries for the file path of an artifact of the target. This makes generator expressions such as `TARGET_FILE_DIR` behave the same way as `TARGET_PROPERTY` which never generated a graph dependency.
* | Add ISPC compiler support to CMakeRobert Maynard2020-08-281-2/+3
|/
* Genex: $<TARGET_PROPERTY> strip emtpy list elements for predefined propertiesMarc Chevrier2020-07-211-4/+6
| | | | Fixes: #20951
* Genex $<COMPILE_LANGUAGE>: Extend contexts supportedMarc Chevrier2020-07-131-3/+6
| | | | | | | | When genex $<TARGET_PROPERTY:...> for properties like INCLUDE_DIRECTORIES is evaluated as part of add_custom_command or add_custom_target, genex $<COMPILE_LANGUAGE> and $<COMPLIE_LANG_AND_ID> should be supported. Fixes: #20926
* cmStandardLevelResolver: Added to handle standard level queriesRobert Maynard2020-07-011-5/+6
| | | | Refactored out of cmMakefile
* Genex: $<CONFIG:> now supports multiple configurationsRobert Maynard2020-06-241-12/+16
| | | | | Instead of having to do $<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>> you can do $<CONFIG:Release,MinSizeRel>
* Refactor language standard computationJustin Goshi2020-06-161-2/+2
| | | | | Instead of mutating the configure-time cmTarget's properties at generate time, compute and store it in a cmGeneratorTarget field.
* cmMakefile: Change CompileFeatureKnown to take target name instead of targetJustin Goshi2020-06-151-1/+1
| | | | The implementation needs only the target name.
* add_library/add_executable: allow local alias to imported targetsMarc Chevrier2020-06-021-0/+8
| | | | Fixes: #20641
* Single location for cmProp typedefVitaly Stakhovsky2020-06-011-0/+1
|
* Merge topic 'stl-support'Brad King2020-05-011-2/+1
|\ | | | | | | | | | | | | 8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view> Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4689
| * Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view>Marc Chevrier2020-04-301-2/+1
| |
* | cmGeneratorTarget::GetProperty: return cmPropVitaly Stakhovsky2020-04-291-9/+8
|/
* Genex: Add generator expressions $<DEVICE_LINK> and $<HOST_LINK>Marc Chevrier2020-04-191-0/+68
| | | | | | 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.
* Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-4/+5
|
* cmTarget::GetProperty: return cmPropVitaly Stakhovsky2020-03-301-5/+5
|
* cmTarget: minor code improvementsVitaly Stakhovsky2020-03-171-3/+3
|
* Genex: Add $<LINK_LANGUAGE:...> and $<LINK_LANG_AND_ID:...>Marc Chevrier2020-02-261-0/+149
| | | | | | This MR may help to solve issues #19757 and #18008 Fixes: #19965
* cm::String: enhance compatibility with STLMarc Chevrier2020-01-251-1/+1
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-17/+18
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* Languages: Add support for Objective-C++Steve Wilson2019-09-281-1/+7
| | | | | | | | | | | | | | | | | Add entries in Modules and Modules/Platform to support Objective-C++ compiler determination and identification. Add Modules to check Objective-C++ compiler flags, source compilations, program checks, etc... Use OBJCXX as the designator of the language, eg: project(foo OBJCXX) Add various tests for Objective-C++ language features. Add tests to preserve C++ handling of .M and .mm files when Objective-C++ is not a configured language. Co-authored-by: Cristian Adam <cristian.adam@gmail.com>
* cmGeneratorExpression: Remove Evaluate overload by parameter re-orderingDaniel Eiband2019-09-221-8/+8
| | | | | | | | Simplify by re-ordering parameters of cmCompiledGeneratorExpression::Evaluate so that frequently used parameters are before less frequently used parameters. This allows with little extra arguments to get rid of one Evaluate overload, which makes it easier to implement the cmGeneratorExpression::Evaluate utility. The latter would otherwise need four overloads.
* cmGeneratorExpression: Move quiet flag to cmCompiledGeneratorExpressionDaniel Eiband2019-09-221-2/+3
| | | | | | The quiet flag is false for all but one call to Evaluate. Make the quiet flag a setter of cmCompiledGeneratorExpression to be able to remove it from the Evaluate function signature.
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-1/+2
| | | | | | | | | | | | | | Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-4/+4
|
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-1/+1
| | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* Merge topic 'source_sweep_ostringstream_single'Brad King2019-08-261-3/+3
|\ | | | | | | | | | | | | 3b2b02825d Source sweep: Replace std::ostringstream when used with a single append Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3726
| * Source sweep: Replace std::ostringstream when used with a single appendSebastian Holtermann2019-08-231-3/+3
| | | | | | | | | | | | | | This replaces `std::ostringstream`, when it is written to only once. If the single written argument was numeric, `std::to_string` is used instead. Otherwise, the single written argument is used directly instead of the `std::ostringstream::str()` invocation.
* | Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-6/+3
|/ | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* Merge topic 'isolate-declarations'Brad King2019-08-221-3/+6
|\ | | | | | | | | | | | | d331021255 clang-tidy: isolate declarations for readability Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3704
| * clang-tidy: isolate declarations for readabilityRegina Pfeifer2019-08-201-3/+6
| |
* | Merge topic 'shared-string'Brad King2019-08-211-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | be7807478c cmDefinitions: Reduce allocation of keys and values in MakeClosure e07e2bc8bb bootstrap: Compile cm::String c1787cb5eb cpack.cxx: Re-order include blocks to follow our conventions 141e307484 cmConfigure.h: Tell windows.h not to define min/max macros Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3669
| * | cmDefinitions: Reduce allocation of keys and values in MakeClosureBrad King2019-08-201-1/+1
| |/ | | | | | | | | | | | | Use `cm::String` to store keys and values so that `MakeClosure` does not need to allocate new copies of all of them. Issue: #19581
* | Merge topic 'cm-contains'Brad King2019-08-211-9/+4
|\ \ | |/ |/| | | | | | | | | | | | | 2dfc52675c cmAlgorithms: Add cmContains Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !3700
| * cmAlgorithms: Add cmContainsRegina Pfeifer2019-08-191-9/+4
| | | | | | | | Also, use the new function where applicable.
* | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-1/+1
|/ | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-12/+10
|
* clang-tidy: Enable performance-inefficient-string-concatenationSebastian Holtermann2019-08-051-1/+1
| | | | | | | Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* Genex: Optimize build setting TARGET_PROPERTY evaluationBrad King2019-07-231-40/+35
| | | | | | | | | | | | | | | For each build setting property (such as `COMPILE_DEFINITIONS` or `INCLUDE_DIRECTORIES`), the value of `$<TARGET_PROPERTY:target,prop>` includes the values of the corresponding `INTERFACE_*` usage requirement property from the transitive closure of link libraries of the target. Previously we computed this by constructing a generator expression string like `$<TARGET_PROPERTY:lib,INTERFACE_COMPILE_DEFINITIONS>` and recursively evaluating it with the generator expression engine. Avoid the string construction and parsing by using the dedicated evaluation method `cmGeneratorTarget::EvaluateInterfaceProperty`. Issue: #18964, #18965
* Genex: Optimize usage requirement TARGET_PROPERTY recursionBrad King2019-07-231-22/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In large projects the generation process spends a lot of time evaluating usage requirements through transitive interface properties on targets. This can be seen in a contrived example with deep dependencies: set(prev "") foreach(i RANGE 1 500) add_library(a${i} a.c) target_compile_definitions(a${i} PUBLIC A${i}) target_link_libraries(a${i} PUBLIC ${prev}) set(prev a${i}) endforeach() For each usage requirement (such as `INTERFACE_COMPILE_DEFINITIONS` or `INTERFACE_INCLUDE_DIRECTORIES`), the value of the generator expression `$<TARGET_PROPERTY:target,prop>` includes the values of the same property from the transitive closure of link libraries of the target. Previously we computed this by constructing a generator expression string like `$<TARGET_PROPERTY:lib,INTERFACE_COMPILE_DEFINITIONS>` and recursively evaluating it with the generator expression engine. Avoid the string construction and parsing by creating and using a dedicated evaluation method `cmGeneratorTarget::EvaluateInterfaceProperty` that looks up the properties directly. Issue: #18964, #18965