Ben Boeckel
c97de1047f
cmMakefile: add support for a "synthesized" target
...
It is a normal target, but will end up copying its internals from
another target. Keep track of this state so that such copying can only
occur when intended.
2023-02-14 12:33:58 -05:00
Ben Boeckel
1d0426f642
cmTarget: make Visibility an enum class
2023-02-14 12:28:58 -05:00
Ben Boeckel
5b58695321
cmTarget: store visibility as an enum
rather than bools
...
C++ modules are going to introduce a third concept of "synthesized"
targets, so update logic where needed to avoid assuming "not imported?
must be normal".
Also add an accessor method to perform queries against the visibility.
2023-02-14 12:23:15 -05:00
Ben Boeckel
dd968ca388
cmTarget: convert VS property settings to the new property lambda
2023-02-02 12:43:14 -05:00
Ben Boeckel
b69fba7cd7
cmTarget: factor out POSITION_INDEPENDENT_CODE
initialization
...
This property is initialized using the common framework, but then forced
on SHARED and MODULE targets, so just post-process the property in this
case.
2023-02-02 12:43:14 -05:00
Ben Boeckel
42575a660f
cmTarget: factor out properties with targets with commands
2023-02-02 12:43:13 -05:00
Ben Boeckel
f551f49a17
cmTarget: factor out properties for targets with exports
2023-02-02 12:43:13 -05:00
Ben Boeckel
d1627118e7
cmTarget: factor out executable-requiring properties
2023-02-02 12:43:13 -05:00
Ben Boeckel
f0ae00d727
cmTarget: factor out linkable normal library target properties
2023-02-02 12:43:13 -05:00
Ben Boeckel
9f7a25a2c7
cmTarget: factor out non-executable normal target with artifact properties
2023-02-02 12:43:13 -05:00
Ben Boeckel
ab2b967ce6
cmTarget: factor out normal targets with artifact properties
2023-02-02 12:43:13 -05:00
Ben Boeckel
c3dbbcef65
cmTarget: factor out normal non-imported target properties
2023-02-02 12:43:13 -05:00
Ben Boeckel
92a4b21ac9
cmTarget: factor out non-imported target properties
2023-02-02 12:43:13 -05:00
Ben Boeckel
7a34637c3d
cmTarget: factor out properties for normal targets
2023-02-02 12:43:13 -05:00
Ben Boeckel
35d6a6b186
cmTarget: factor out Xcode and with-compiled source properties
2023-02-02 12:43:13 -05:00
Ben Boeckel
8004fe3f14
cmTarget: factor out Xcode-requiring properties
2023-02-02 12:43:13 -05:00
Ben Boeckel
e522f8ca06
cmTarget: factor out properties initialized for target which compile
2023-02-02 12:43:13 -05:00
Ben Boeckel
8844969f16
cmTarget: factor out always-initialized properties
2023-02-02 12:43:13 -05:00
Ben Boeckel
23bed98a20
cmTarget: create a TargetProperty
structure
...
This structure will encapsulate when properties are initialized within a
target.
2023-02-02 12:43:13 -05:00
Brad King
a58b0baca2
Merge topic 'cmTarget-refactorings'
...
33f629184f cmTarget: simplify `CheckLinkLibraryPattern`
22b9ce73e7 cmTarget: refactor INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE usage requirements
332d2f8f52 cmTarget: refactor INTERFACE_LINK_LIBRARIES_DIRECT usage requirements
15eec07500 cmTarget: refactor INTERFACE_LINK_LIBRARIES usage requirements
e80689d101 cmTarget: refactor LINK_LIBRARIES usage requirements
4f009d2121 cmTarget: refactor LINK_DIRECTORIES usage requirements
99e783e735 cmTarget: refactor LINK_OPTIONS usage requirements
fd295dd263 cmTarget: refactor SOURCES usage requirements
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8127
2023-02-01 09:07:58 -05:00
Ben Boeckel
33f629184f
cmTarget: simplify CheckLinkLibraryPattern
...
Now that usage properties have more of a representation, the function
can just take the requirement directly.
2023-01-31 10:07:02 -05:00
Ben Boeckel
22b9ce73e7
cmTarget: refactor INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
332d2f8f52
cmTarget: refactor INTERFACE_LINK_LIBRARIES_DIRECT usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
15eec07500
cmTarget: refactor INTERFACE_LINK_LIBRARIES usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
e80689d101
cmTarget: refactor LINK_LIBRARIES usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
4f009d2121
cmTarget: refactor LINK_DIRECTORIES usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
99e783e735
cmTarget: refactor LINK_OPTIONS usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
fd295dd263
cmTarget: refactor SOURCES usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
b21ab2638f
cmTarget: refactor PRECOMPILE_HEADERS usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
8566336776
cmTarget: refactor COMPILE_DEFINITIONS usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
70555450fe
cmTarget: refactor COMPILE_FEATURES usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
03b9240d6b
cmTarget: refactor COMPILE_OPTIONS usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
91561103de
cmTarget: refactor INCLUDE_DIRECTORIES usage requirements
2023-01-31 10:07:02 -05:00
Ben Boeckel
f644fc8aca
cmTarget: introduce a UsageRequirementProperty
structure
...
This structure will encapsulate the behaviors of usage requirements.
There are a number of them now and they all behave very similarly, so
try to reduce the code duplication as much as possible.
2023-01-31 10:07:02 -05:00
Ben Boeckel
a7c29f3ebd
cmTarget: use static string views for per-config properties
2023-01-30 09:32:44 -05:00
Ben Boeckel
47315d817c
cmTarget: group remaining properties
...
These are kind of a mixed assortment.
2023-01-30 09:25:37 -05:00
Ben Boeckel
32d21f215f
cmTarget: put build graph-related properties into a group
2023-01-30 09:25:36 -05:00
Ben Boeckel
6f9821d179
cmTarget: put static analysis (co-compile) properties in a group
2023-01-30 09:25:35 -05:00
Ben Boeckel
ead9ff61f9
cmTarget: put linking-related properties in a group
2023-01-30 09:25:34 -05:00
Ben Boeckel
9bb824a237
cmTarget: put compile-related properties in a group
2023-01-30 09:25:31 -05:00
Ben Boeckel
c33d7d1162
cmTarget: use cmNonempty rather than local implementation
2023-01-26 23:23:12 -05:00
Ben Boeckel
90d74fcc85
cmTarget: use an enum for the action when writing fileset properties
2023-01-26 23:23:12 -05:00
Ben Boeckel
b532911c9e
cmTarget: simplify fileset type property management
...
Instead of copy/pasting conditionals for each fileset type, just make an
array of the structures and iterate over them.
2023-01-26 23:23:12 -05:00
Rose
6d15754814
Make vector operations more efficient
2022-12-10 12:48:09 -05:00
Kyle Edwards
232467eb1c
clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property
...
Fixes : #21362
2022-12-06 10:39:29 -05:00
Ben Boeckel
a02d792c6e
cxxmodules: add properties to control scanning
...
The `CXX_SCAN_FOR_MODULES` property may be used to control scanning for
targets and for source files rather than assuming "C++20 always needs to
be scanned".
2022-11-18 07:54:31 -05:00
Kyle Edwards
09d7f947d6
cmGeneratorExpression: Require cmake instance
2022-11-11 12:29:41 -05:00
Brad King
50b668ddc8
Merge topic 'add_subdirectory_system'
...
2eb30a7036 add_subdirectory: Add SYSTEM option
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7399
2022-09-27 10:28:49 -04:00
Da Quexian
2eb30a7036
add_subdirectory: Add SYSTEM option
...
Fixes : #22401
Signed-off-by: Da Quexian <daquexian566@gmail.com>
2022-09-26 10:56:54 -04:00
Brad King
c3e68020d6
Merge topic 'MsvcDebugInformationFormatAbstraction'
...
a858466aac MSVC: Add test for debug information format
0e96a20478 MSVC: Add abstraction for debug information format
d4c8111da4 Clang/Windows: Clarify name of internal runtime library flags variables
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7606
2022-09-14 09:21:27 -04:00