summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'check-library-properties-fix-performances-regression'Brad King2022-09-091-1/+1
|\ | | | | | | | | | | | | | | 985b4c82a6 Check link libraries properties: fix performances regression a47eef32a3 renames method FinalizeTargetCompileInfo() in FinalizeTargetConfiguration(). Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7651
| * renames method FinalizeTargetCompileInfo() in FinalizeTargetConfiguration().Marc Chevrier2022-09-071-1/+1
| |
* | target_*: Fix cross-directory call backtracesBrad King2022-08-221-2/+4
| | | | | | | | | | | | | | Record the call-site backtrace, not the current backtrace of the target's directory. Fixes: #23873
* | Merge topic 'verify-interface-header-sets-add-compile-definitions'Brad King2022-07-281-0/+6
|\ \ | |/ | | | | | | | | | | | | 27fd172d8d VERIFY_INTERFACE_HEADER_SETS: Finalize compile info for verify targets 626e641a19 cmTarget: Factor out FinalizeTargetCompileInfo() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7516
| * cmTarget: Factor out FinalizeTargetCompileInfo()Kyle Edwards2022-07-271-0/+6
| |
* | cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-161-0/+4
|/ | | | | | | | | | | | | | | C++ modules have two variants which are of importance to CMake: - `CXX_MODULES`: interface modules (those using `export module M;`, `export module M:part;`, or `module M:internal_part;`) - `CXX_MODULE_HEADER_UNITS`: importable header units Creating C++ modules or partitions are *not* supported in any other source listing. This is because the source files must be installed (so their scope matters), but not part of usage requirements (what it means for a module source to be injected into a consumer is not clear at this moment). Due to the way `FILE_SET` works with scopes, they are a perfect fit as long as `INTERFACE` is not allowed (which it is not).
* cmTarget: add support for querying all file set namesBen Boeckel2022-04-271-0/+1
|
* Merge topic 'xcode-universal'Brad King2022-04-141-0/+2
|\ | | | | | | | | | | | | | | | | 40dd46a96a Xcode: Add tests for OBJECT library per target `OSX_ARCHITECTURES` da4ccb502b Xcode: Check for multiple `OSX_ARCHITECTURES` on target 41ba35a42b cmTarget: Add `HasKnownObjectFileLocation()` shorthand Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7154
| * cmTarget: Add `HasKnownObjectFileLocation()` shorthandHyper Nova Sun2022-04-111-0/+2
| | | | | | | | | | | | | | | | Allow `cmGlobalGenerator`s to decide `HasKnownObjectFileLocation()` per given `cmTarget` - `cmGlobalGenerator::HasKnownObjectFileLocation()` now takes an optional `cmGeneratorTarget` - `cmTarget::HasKnownObjectFileLocation()` added as a shorthand
* | Merge topic 'file-set-repr-improvements'Brad King2022-04-121-2/+3
|\ \ | |/ |/| | | | | | | | | | | | | 5fa15ec9f3 Help: Document that target_sources defines [INTERFACE_]HEADER_SETS c5d4812f20 cmTarget: make HEADER_SETS and INTERFACE_HEADER_SETS read-only 05783b168d cmFileSet: store visibility with the fileset Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7168
| * cmFileSet: store visibility with the filesetBen Boeckel2022-04-111-2/+3
| | | | | | | | | | The visibility is intrinsic to the fileset, so store it with it. This avoids recalculating it on every addition to the fileset.
| * Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branchBrad King2022-03-211-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit f3ad061858 (Add usage requirements to update direct link dependencies, 2022-01-12, v3.23.0-rc1~44^2) and the property storage updates in its predecessor commit 193a999cd5 (cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage, 2022-01-06, v3.23.0-rc1~44^2~1) from the 3.23 release branch. After initial experience using the feature in practice, additional design considerations have been raised for discussion in the original issue. To avoid rushing this for the 3.23 series, we've decided to revert the feature for now so it can be revised for a future release. Issue: #22496
| * Merge topic 'restore-target-export-includes' into release-3.23Brad King2022-02-101-2/+5
| |\ | | | | | | | | | | | | | | | | | | | | | 83d79636bf install(TARGETS): Restore per-export INCLUDES DESTINATION Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6969
* | \ Merge topic 'restore-target-export-includes'Brad King2022-02-101-2/+5
|\ \ \ | |/ / |/| / | |/ | | | | | | | | 83d79636bf install(TARGETS): Restore per-export INCLUDES DESTINATION Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6969
| * install(TARGETS): Restore per-export INCLUDES DESTINATIONEugene Shalygin2022-02-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 55e4753bbb (Refactor cmTargetExport removing InterfaceIncludeDirecories, 2021-07-20, v3.22.0-rc1~337^2~1) the storage of `INCLUDES DESTINATION` was moved into each target. However, a target may be installed in multiple exports, and their `INCLUDES DESTINATION` should not be mixed. Convert the IncludeDirectoriesEntries vector to a map and modify access function to store the directories lists with respect to cmExportTarget object. This fixes error when the same target is exported more than once via different exports and each for consequent export its include directories list grows. Add a test for this case. Fixes: #23183
* | cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storageBrad King2022-01-291-0/+2
| | | | | | | | These properties will be given meaning by later commits.
* | cmTarget: Record backtraces for INTERFACE_LINK_LIBRARIESBrad King2021-12-151-0/+2
| |
* | cmTargetPropertyComputer: Simplify by restoring use of cmMakefileBrad King2021-12-081-4/+8
| | | | | | | | | | | | | | | | | | | | | | 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.
* | cmTarget: Add cmFileSet and associated propertiesKyle Edwards2021-10-271-0/+15
|/
* Rename cmProp in cmValueMarc Chevrier2021-09-211-8/+8
|
* Refactor: Convert parallel string/backtrace vectors to BT vectorsKyle Edwards2021-09-031-30/+15
|
* Enhancement: SetProperty accept cmProp or std::stringMarc Chevrier2021-08-251-1/+5
| | | | | Methods SetProperty of classes cmPropertyMap, cmStateDirectory and cmMakefile accept now cmProp or std::string as argument.
* Refactor cmTargetExport removing InterfaceIncludeDirecoriesEugene Shalygin2021-07-221-0/+3
| | | | | | | | Because of this property in the cmTargetExport struct, exporting targets is not uniform: top-level ones have to be dealt with via the cmTargetExport objects, while all linked ones are cmGeneratorTarget objects. Let's pass this additional includedirectories via a special target property making handling exported targets uniform.
* clang-tidy: fix `readability-redundant-access-specifiers` warningsBen Boeckel2021-01-271-1/+0
|
* Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-1/+1
| | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* cmGeneratorTarget: Refactor custom command dependency evaluationBrad King2020-10-291-0/+1
| | | | | | Previously we only used cmCustomCommandGenerator to evaluate generator expressions for dependencies. Use it for command lines too. It also collects target references for us, with backtraces.
* Constify some code as suggested by clang-tidyCengizhan Pasaoglu2020-10-191-1/+1
|
* Modernize: Use #pragma once in all header filesKitware Robot2020-09-031-4/+1
| | | | | | | | | | | | | | | | #pragma once is a widely supported compiler pragma, even though it is not part of the C++ standard. Many of the issues keeping #pragma once from being standardized (distributed filesystems, build farms, hard links, etc.) do not apply to CMake - it is easy to build CMake on a single machine. CMake also does not install any header files which can be consumed by other projects (though cmCPluginAPI.h has been deliberately omitted from this conversion in case anyone is still using it.) Finally, #pragma once has been required to build CMake since at least August 2017 (7f29bbe6 enabled server mode unconditionally, which had been using #pragma once since September 2016 (b13d3e0d)). The fact that we now require C++11 filters out old compilers, and it is unlikely that there is a compiler which supports C++11 but does not support #pragma once.
* Factor out generator checks for filtering on non-compiling targetsBrad King2020-07-231-0/+1
| | | | | Add a `cmGeneratorTarget::CanCompileSources` helper method to tell generators whether a target might compile anything.
* fileapi: Support multiple backtraces for language standardJustin Goshi2020-07-061-1/+1
|
* Merge topic 'fileApiAddLanguageStandardBacktrace'Brad King2020-06-291-0/+7
|\ | | | | | | | | | | | | | | | | 7d6861f367 fileapi: Extend codemodel targets with language standard ba835874a4 Add backtrace support for language standard e43486a639 cmGeneratorTarget: Clarify name of language property lookup helper Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4798
| * Add backtrace support for language standardJustin Goshi2020-06-221-0/+7
| |
* | Refactor: Add IsAndroidGuiExecutable() method to cmTargetKyle Edwards2020-06-181-0/+3
|/
* Single location for cmProp typedefVitaly Stakhovsky2020-06-011-2/+1
|
* cmTarget: Replace "perConfig" constructor boolean with enumBrad King2020-05-181-1/+7
|
* GetSafeProperty: return std::string const&Vitaly Stakhovsky2020-04-301-1/+1
|
* cmTarget::GetProperty: return cmPropVitaly Stakhovsky2020-03-301-6/+7
|
* cmTarget: minor code improvementsVitaly Stakhovsky2020-03-171-2/+2
|
* Ninja Multi-Config: Fix issue with framework dependencies and AutogenKyle Edwards2020-02-171-2/+3
| | | | Fixes: #20345
* AppendProperty: convert value param to std::stringVitaly Stakhovsky2020-01-251-6/+1
|
* target_link_libraries: Fix out-of-dir linking of a list of targetsBrad King2020-01-161-3/+1
| | | | | | | | | | | | | | In a case like target_link_libraries(targetInOtherDir PUBLIC "$<1:a;b>") then all entries in the list need to be looked up in the caller's scope. Previously our `::@(directory-id)` suffix would apply only to the last entry. Instead surround the entire entry by a pair `::@(directory-id);...;::@` so that the `::@` syntax can encode a directory lookup scope change evaluated as the list is processed. Fixes: #20204
* Merge topic 'stdstring-target'Brad King2019-12-171-0/+9
|\ | | | | | | | | | | | | c34b4497f8 cmTarget: add std::string overloads Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4137
| * cmTarget: add std::string overloadsVitaly Stakhovsky2019-12-141-0/+9
| |
* | Ninja: Add multi-config variantKyle Edwards2019-12-131-1/+2
|/ | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* cmCustomCommand: Move custom commandsDaniel Eiband2019-09-261-0/+3
|
* cmMakefile: Move enumerations into new headerDaniel Eiband2019-09-261-7/+0
| | | | The enumerations will also be used in cmLocalGenerator.
* cmMakefile: Separate custom command setup from actual creationDaniel Eiband2019-09-171-1/+1
| | | | | Refactor custom command manipulation functions to consist of a setup and a commit stage. The commit stage will be delayed to generate time.
* 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.
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-1/+1
|
* PCH: add PRECOMPILE_HEADERS to special propertiesDaniel Pfeifer2019-08-261-0/+5
|