1415 Commits

Author SHA1 Message Date
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
Glen Chung 0e96a20478 MSVC: Add abstraction for debug information format
Replace our hard-coded default for `/Zi` with a first-class abstraction
to select the debug information format an enumeration of logical
names.  We've long hesitated to do this because the idea of "debug
information format" touches on related concepts on several platforms.
Avoid that scope creep by simply defining an abstraction that applies
only when targeting the MSVC ABI on Windows.

Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose a
runtime library under the old behavior.  Add policy CMP0141 to
provide compatibility.

Fixes: #10189
2022-09-14 09:12:47 -04:00
Brad King 06404a1979 Merge topic 'check-library-properties-fix-performances-regression'
985b4c82a6 Check link libraries properties: fix performances regression
a47eef32a3 renames method FinalizeTargetCompileInfo() in FinalizeTargetConfiguration().

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7651
2022-09-09 09:48:56 -04:00
Marc Chevrier 985b4c82a6 Check link libraries properties: fix performances regression
Fixes: #23939
2022-09-07 15:20:53 +02:00
Marc Chevrier a47eef32a3 renames method FinalizeTargetCompileInfo() in FinalizeTargetConfiguration(). 2022-09-07 14:23:21 +02:00
Brad King fc4451dd31 Merge topic 'xcode-add-gpu-validation-and-default-configuration'
740bee97bd Xcode: Add settings to control a scheme's launch configuration
39456c70e1 Xcode: Add settings to control a scheme's GPU Validation values
4034272ed8 gitignore: Tell Git to ignore the .cache/ directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7581
2022-08-31 09:43:50 -04:00
PatriceJiang 740bee97bd Xcode: Add settings to control a scheme's launch configuration 2022-08-30 10:28:27 -04:00
PatriceJiang 39456c70e1 Xcode: Add settings to control a scheme's GPU Validation values 2022-08-30 10:26:48 -04:00
Brad King 52c95540b7 target_*: Fix cross-directory call backtraces
Record the call-site backtrace, not the current backtrace of the
target's directory.

Fixes: #23873
2022-08-22 15:29:43 -04:00
Brad King d9cca8e83d Merge topic 'verify-interface-header-sets-add-compile-definitions'
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
2022-07-28 08:11:19 -04:00
Kyle Edwards 626e641a19 cmTarget: Factor out FinalizeTargetCompileInfo() 2022-07-27 12:24:53 -04:00
Brad King 5d8289116d Merge topic 'vs-compile-batching'
9a0a94fdaa VS: Add variable to to turn off Visual Studio compile batching
a7ebb73929 Help: Improve formatting in VS_NO_COMPILE_BATCHING docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7405
2022-06-23 09:23:56 -04:00
Brad King 9a0a94fdaa VS: Add variable to to turn off Visual Studio compile batching
Extend the change from commit b764c7c273 (VS: Add property to turn off
Visual Studio compile batching, 2022-02-07, v3.24.0-rc1~710^2) by
adding a variable to initialize the property on every target.

Issue: #23179
Fixes: #23639
2022-06-22 12:07:03 -04:00
Brad King d94e09ec88 Merge topic 'cpp-named-module-file-sets'
07bc3b07ec gitlab-ci: test C++ modules using GCC
1b2270aa4e ci: add a Docker image to test out C++ modules with GCC
8c5a53096a Tests/RunCMake/CXXModules: add module-using examples
4151547e2f cmGlobalNinjaGenerator: use `cmModuleMapper` implementation
b43bdaff3c cmCxxModuleMapper: implement support for GCC's module map format
02d0f0e752 cmCxxModuleMapper: add source to handle module mapper contents
a046a45aad cmGlobalNinjaGenerator: add a TODO for header units
386465bf83 cmTarget: add support for C++ module fileset types
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7369
2022-06-17 11:35:12 -04:00
Ben Boeckel 386465bf83 cmTarget: add support for C++ module fileset types
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).
2022-06-16 10:28:34 -04:00
Brad King dd8befd9d3 Merge topic 'add_SYSTEM_prop'
69beee5314 Add SYSTEM target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7308
2022-06-16 09:00:45 -04:00
Harry Mallon a1a0ae3ad4 Xcode: Add Xcode SCHEME control for 'Launch' control 2022-06-15 19:02:56 +01:00
Da Quexian 69beee5314 Add SYSTEM target property
If it is ON, treat INTERFACE_INCLUDE_DIRECTORIES as system include directories.

Issue: #18040

Signed-off-by: Da Quexian <daquexian566@gmail.com>
2022-06-16 00:25:27 +08:00
Kyle Edwards 259c265112 VERIFY_HEADER_SETS: Rename to VERIFY_INTERFACE_HEADER_SETS
Issue: #23448
2022-05-18 10:18:40 -04:00
Brad King 79b64690d9 Merge topic 'werror-property'
76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !7187
2022-05-10 10:30:42 -04:00