Commit Graph

33632 Commits

Author SHA1 Message Date
Brad King
77610c6cf0 Merge topic 'ctest-timeout-junit'
6ef54e0272 CTest: add test failure reason to JUnit XML output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8151
2023-02-03 10:07:52 -05:00
Brad King
a1bee24812 Merge topic 'cmTarget-refactor-property-init'
dd968ca388 cmTarget: convert VS property settings to the new property lambda
b69fba7cd7 cmTarget: factor out `POSITION_INDEPENDENT_CODE` initialization
42575a660f cmTarget: factor out properties with targets with commands
f551f49a17 cmTarget: factor out properties for targets with exports
d1627118e7 cmTarget: factor out executable-requiring properties
f0ae00d727 cmTarget: factor out linkable normal library target properties
9f7a25a2c7 cmTarget: factor out non-executable normal target with artifact properties
ab2b967ce6 cmTarget: factor out normal targets with artifact properties
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8139
2023-02-03 10:05:24 -05:00
Brad King
c3210aab46 Merge topic 'lang-linker-launcher-genex'
33e27f6ca6 <LANG>_LINKER_LAUNCHER: Allow generator expressions
84ada0b0c9 <LANG>_COMPILER_LAUNCHER: Expand subset of genexes that can be evaluated

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8152
2023-02-03 10:00:49 -05:00
Kitware Robot
82f61a20b4 CMake Nightly Date Stamp 2023-02-03 00:01:13 -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
Kyle Edwards
33e27f6ca6 <LANG>_LINKER_LAUNCHER: Allow generator expressions 2023-02-02 11:58:56 -05:00
Brad King
9caa9c8ace Merge topic 'post-rel-dev'
220fa1d92b Configure CMake itself with policies through CMake 3.25
4feea27761 export: Increase maximum policy version in exported files to 3.25
1ff14d584c Add deprecation warnings for policies CMP0114 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8149
2023-02-02 11:48:25 -05:00
Brad King
0df3b0ffa9 Merge topic 'modules-lang-specific-target-linked-dirs'
13810dee17 cmDependsFortran: require that dependency info files work
eed295fd8a cmGlobalNinjaGenerator: require that dependency info files work
837f7c113a cmCommonTargetGenerator: classify linked target directories by language
d19648a928 cmGeneratorTarget: add a method to query if Fortran sources exist
245a89d8b6 cmMakefileTargetGenerator: make "target linked info" variable Fortran-specific
aeb1b2ae3d cmMakefileTargetGenerator: simplify string streaming

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8146
2023-02-02 11:46:45 -05:00
Kyle Edwards
84ada0b0c9 <LANG>_COMPILER_LAUNCHER: Expand subset of genexes that can be evaluated 2023-02-02 11:37:30 -05:00
Frank Winklmeier
6ef54e0272 CTest: add test failure reason to JUnit XML output
In case of test failure, add the test failure reason (e.g. "Timeout") to
the failure message in the XML file. This is the same value that is
shown in the ctest text output.

Fixes: #24184
2023-02-02 16:57:12 +01:00
Kitware Robot
063913f486 CMake Nightly Date Stamp 2023-02-02 00:01:10 -05:00
Brad King
4feea27761 export: Increase maximum policy version in exported files to 3.25
The files generatd by `install(EXPORT)` and `export()` commands
are known to work with policies as of CMake 3.25, so enable them
in sufficiently new CMake versions.
2023-02-01 17:01:38 -05:00
Brad King
1ff14d584c Add deprecation warnings for policies CMP0114 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for policies
introduced in CMake 3.19 and below to encourage projects to port
away from setting policies to OLD.
2023-02-01 17:01:38 -05:00
Brad King
641dd4ee73 Begin post-3.26 development 2023-02-01 14:46:16 -05:00
Brad King
c01d01646a Begin 3.26 release versioning 2023-02-01 14:43:09 -05:00
Brad King
5252c88569 try_compile: Record propagated CMake variables in configure log
These provide more detailed information about how the test project was
configured.

Issue: #23200
2023-02-01 09:32:42 -05:00
Brad King
0a48d8fe5c ConfigureLog: De-duplicate event backtrace and check key generation
All event kinds have these fields, so centralize their implementation.
2023-02-01 09:32:42 -05:00
Ben Boeckel
13810dee17 cmDependsFortran: require that dependency info files work
Now that only targets expected to have information are listed, all
`DependInfo.cmake` files should exist.
2023-02-01 09:13:51 -05:00
Brad King
11d59c9ed6 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2023-02-01 (cafea4c8)
2023-02-01 09:12:57 -05:00
Ben Boeckel
eed295fd8a cmGlobalNinjaGenerator: require that dependency info files work
Now that only targets expected to have information are listed, all
`<LANG>Modules.json` files should exist.
2023-02-01 09:12:49 -05:00
Brad King
0292cf3c96 Merge topic 'xcode-header-search'
8527f42b96 Xcode: Explicitly disable deprecated user include path feature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8143
2023-02-01 09:11:45 -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
Brad King
29d19e0e5a Merge topic 'cmTarget-property-grouping'
a7c29f3ebd cmTarget: use static string views for per-config properties
47315d817c cmTarget: group remaining properties
32d21f215f cmTarget: put build graph-related properties into a group
6f9821d179 cmTarget: put static analysis (co-compile) properties in a group
ead9ff61f9 cmTarget: put linking-related properties in a group
9bb824a237 cmTarget: put compile-related properties in a group

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8135
2023-02-01 09:07:06 -05:00
Brad King
6b2c52b25b Merge topic 'ccg-index-type'
91a26ce041 cmComputeComponentGraph: use `size_t` for component indices
65c0a64dc5 cmComputeComponentGraph: use a name for "invalid component"
50abdaab93 IWYU: exclude `__decay_and_strip<int>` as well

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8128
2023-02-01 09:06:07 -05:00
Kitware Robot
4e9db2a8fa CMake Nightly Date Stamp 2023-02-01 00:01:16 -05:00
Ben Boeckel
837f7c113a cmCommonTargetGenerator: classify linked target directories by language
These directories are used to direct collators for Fortran and C++
modules to consume dependent module information to properly collate.
However, the consumption of these files merely checks for existence of
the file, not whether they are actually needed anymore.

The problem arises when a target has Fortran or C++ modules at point A,
a build occurs populating this file, and then the target is updated to
no longer have potential modules. The `DependInfo.make` (for
`Makefiles`) or `<LANG>DependInfo.json` (for `Ninja`) files still exist
as they are never guaranteed to be cleaned up. This can introduce stale
information to the build which may cause a false-positive compilation if
a module file happens to still exist and gets found this way.

Instead, query the `linked-target-dirs` using the language in question
and only add the directory if it contains potential sources for modules
coming from the language in question.
2023-01-31 22:34:29 -05:00
Ben Boeckel
d19648a928 cmGeneratorTarget: add a method to query if Fortran sources exist 2023-01-31 22:23:36 -05:00
Ben Boeckel
245a89d8b6 cmMakefileTargetGenerator: make "target linked info" variable Fortran-specific
This variable is Fortran-specific, so clarify that through its name.
2023-01-31 22:23:36 -05:00
Ben Boeckel
aeb1b2ae3d cmMakefileTargetGenerator: simplify string streaming 2023-01-31 22:23:36 -05:00
Brad King
8527f42b96 Xcode: Explicitly disable deprecated user include path feature
The `ALWAYS_SEARCH_USER_PATHS` feature is documented [1] to search the
paths in `USER_HEADER_SEARCH_PATHS` before `HEADER_SEARCH_PATHS`.  The
behavior has been long discouraged and was deprecated by Xcode 8.3.
Furthermore, Xcode explicitly disables this setting when creating new
projects.  We can do that too since we do not generate any user header
search paths anyway.

Previously we always set `USE_HEADERMAP` to `NO` to prevent Xcode's
warning about an ancient "header map" feature deprecation.  However,
this somehow breaks Xcode 14's "Build Documentation" feature.  Setting
`ALWAYS_SEARCH_USER_PATHS` to `NO` seems to prevent the header map
warning too, so drop `USE_HEADERMAP` to fix the documentation feature.

[1] https://developer.apple.com/documentation/xcode/build-settings-reference

Fixes: #24379
2023-01-31 14:21:20 -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