Brad King
b3da9c6d60
GenEx: Evaluate LINK_LIBRARIES target properties transitively
...
The `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` target properties
establish the graph of link dependencies used to propagate usage
requirements transitively. Therefore the `$<TARGET_PROPERTY:...>`
generator expression should evaluate them transitively as it does for
other transitive properties. Add policy CMP0189 for compatibility.
Fixes : #26709
Issue: #12435
2025-02-24 11:43:47 -05:00
Brad King
1113623d25
Merge branch 'release-3.31'
2025-02-24 11:20:39 -05:00
Brad King
859ca5c4d7
CMake 3.31.6
2025-02-24 10:53:17 -05:00
Brad King
806fe88cb6
Merge branch 'release-3.30'
2025-02-24 10:44:32 -05:00
Brad King
1e2e9ceccf
Merge branch 'release-3.30' into release-3.31
2025-02-24 10:43:52 -05:00
Brad King
2bd6fbe1b0
CMake 3.30.8
2025-02-24 10:09:52 -05:00
Brad King
f0140a6e72
Merge topic 'policy-version-env'
...
33856b1d62 Add CMAKE_POLICY_VERSION_MINIMUM environment variable
04721acc6c Tests: Cover CMAKE_POLICY_VERSION_MINIMUM in initial cache script
729470ff6d Tests: Cover CMAKE_POLICY_VERSION_MINIMUM in script mode
6cd10ffed7 Tests: Cover CMAKE_POLICY_VERSION_MINIMUM as cache entry
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Acked-by: John Parent <john.parent@kitware.com >
Merge-request: !10376
2025-02-21 09:13:01 -05:00
Brad King
4701678fa1
Merge topic 'doc-add_dependencies'
...
77a742b088 Help: add_dependencies requires at least two arguments
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10370
2025-02-21 09:06:48 -05:00
Brad King
33856b1d62
Add CMAKE_POLICY_VERSION_MINIMUM environment variable
...
Extend commit 1a35351125 (Add CMAKE_POLICY_VERSION_MINIMUM to help
configure outdated projects, 2025-02-13, v4.0.0-rc1~12^2) with an
environment variable to initialize the cache entry. That will make it
easier to use when `cmake` is invoked under layers of scripting.
Closes : #26715
2025-02-20 16:55:53 -05:00
Brad King
77a742b088
Help: add_dependencies requires at least two arguments
...
Update the documentation to match the implementation.
2025-02-20 08:25:58 -05:00
Nikita Nemkin
9955a3bb73
Help: Clarify EXCLUDE_FROM_DEFAULT_BUILD behavior
...
Note that solution build configurations ignore dependencies, unlike
the ALL_BUILD target.
Fixes : #12379
2025-02-19 21:07:51 +05:00
Nikita Nemkin
8fa9858e20
Help: Improve VS_SETTINGS and VS_TOOL_OVERRIDE documentation
...
Reorder paragraphs, adjust version notes, add cross-references,
note the ability to exclude files from the build.
Fixes : #11902
2025-02-19 21:07:03 +05:00
Brad King
d2cda92936
Merge topic 'remove-FindGCCXML'
...
2123244746 FindGCCXML: Add policy to remove this module
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !10359
2025-02-18 09:51:32 -05:00
Brad King
121b1f717a
Merge topic 'instrumentation-presets-hooks'
...
45d3ffaa95 instrumentation: Use auto for variables holding closures
d75ccd9f8d instrumentation: Fix docs for ctest --collect-instrumentation option
a2232db802 instrumentation: Make hooks compatible with presets
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !10352
2025-02-18 09:49:47 -05:00
Brad King
ccfa403859
Merge topic 'instrumentation-presets-hooks' into release-4.0
...
45d3ffaa95 instrumentation: Use auto for variables holding closures
d75ccd9f8d instrumentation: Fix docs for ctest --collect-instrumentation option
a2232db802 instrumentation: Make hooks compatible with presets
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !10352
2025-02-18 09:49:44 -05:00
Brad King
00ee82c190
Merge topic 'policy_max-docs'
...
48095c623f Help/cmake_minimum_required: clarify policy_max `versionadded` note
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10363
2025-02-18 09:43:24 -05:00
Brad King
d40e1a0682
Merge topic 'policy_max-docs' into release-4.0
...
48095c623f Help/cmake_minimum_required: clarify policy_max `versionadded` note
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10363
2025-02-18 09:43:23 -05:00
Brad King
63a07d455b
Merge topic 'doc-4.0-relnotes-typo'
...
b5374e0405 Help: Fix typo in 4.0 release notes
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10358
2025-02-18 09:37:02 -05:00
Ben Boeckel
48095c623f
Help/cmake_minimum_required: clarify policy_max versionadded note
...
While the prose clarifies this below, a quick glance at the docs can
make one believe that `...3.10` has no sensible use. However, it is
still useful to tell CMake 3.12 and up that at least 3.10 behavior is
accepted.
2025-02-18 06:20:32 +01:00
Brad King
2123244746
FindGCCXML: Add policy to remove this module
...
GCC-XML has been superseded by CastXML for a long time.
Closes : #26687
2025-02-17 11:35:25 -05:00
Martin Duffy
d75ccd9f8d
instrumentation: Fix docs for ctest --collect-instrumentation option
2025-02-17 11:03:28 -05:00
Brad King
b5374e0405
Help: Fix typo in 4.0 release notes
...
Reported-by: Craig Scott <craig.scott@crascit.com >
2025-02-17 10:35:20 -05:00
Brad King
ceacabc654
Merge topic 'regex2'
...
8d455809b0 string: Allow zero-length matches in all REGEX subcommands
ca65fa9a7f string: Allow references to unmatched groups in REGEX REPLACE
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10251
2025-02-16 11:12:28 -05:00
Brad King
ad13d2f99a
Merge topic 'source-with-and-without-extension'
...
321c647640 Include source file without an extension after the same name with an extension
Acked-by: Kitware Robot <kwrobot@kitware.com >
Tested-by: buildbot <buildbot@kitware.com >
Merge-request: !10271
2025-02-16 11:11:09 -05:00
Brad King
2526b01ffc
Merge topic 'instrumentation_cdash'
...
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files
85a63143ed instrument: don't report target=TARGET_NAME
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10332
2025-02-16 10:58:12 -05:00
Brad King
4300d08b20
Merge topic 'instrumentation_cdash' into release-4.0
...
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files
85a63143ed instrument: don't report target=TARGET_NAME
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10332
2025-02-16 10:58:11 -05:00
Brad King
a36b38502c
Merge topic 'rel-sunos'
...
28f1da4b25 ci: Add jobs to build sunos-{i386,sparc} binaries
59ed18e54d Utilities/Release: Add base images to build sunos-{i386,sparc} binaries
a4e5719d31 Solaris: Rename local variable to avoid conflict with system headers
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10350
2025-02-16 10:55:40 -05:00
Brad King
28f1da4b25
ci: Add jobs to build sunos-{i386,sparc} binaries
2025-02-15 07:28:07 -05:00
Zack Galbreath
a6d4a9a2ae
ctest: Include cmake instrumentation data in XML files
2025-02-15 06:25:12 -05:00
Zack Galbreath
85a63143ed
instrument: don't report target=TARGET_NAME
...
Remove the erroneous default target name when instrumenting
custom commands.
2025-02-15 06:21:58 -05:00
Nikita Nemkin
8d455809b0
string: Allow zero-length matches in all REGEX subcommands
...
The semantics mimic other languages like Python, Java, JS, etc.
To advance past a zero-length match, the search algorithm first
tries to find a non-zero alternative branch. If that fails, it
force-advances by 1 character.
Fixes : #13790 , #13792 , #18690 , #26629
2025-02-15 01:01:49 +05:00
Nikita Nemkin
ca65fa9a7f
string: Allow references to unmatched groups in REGEX REPLACE
...
References to unmatched groups will be replaced with empty strings.
Issue: #26629
Fixes : #19012
2025-02-15 01:00:58 +05:00
Evan Wilde
321c647640
Include source file without an extension after the same name with an extension
...
CMP0115 requires that source files listed in CMake must include their
file extension, but there are cases when projects have different source
files with the same name, but one with an extension and one without.
In the current state, CMake will ignore the file without the extension
an always map it to the file with an extension.
```cmake
add_library(foo bar.c bar)
```
In the above example, the target `foo` will only recognize and depend on
`bar.c` and miss the file `bar` unless `bar` comes before `bar.c` in the
source list.
This issue also affects how custom commands emit files.
This change adds a new policy to recognize files with and without a file
extension as different files, both when building targets, and when they
are being created.
Fixes : #26058
2025-02-14 10:01:10 -05:00
Brad King
8845d33292
Merge topic 'regex'
...
5d039f3be3 regex: Match ^ at most once in repeated searches
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !10221
2025-02-14 09:38:04 -05:00
Brad King
808ada63cb
Merge topic 'diab-compiler-support'
...
8ce6689d8b Diab: Add WindRiver Systems's Diab C/C++ toolchain
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10276
2025-02-14 09:35:26 -05:00
Brad King
dce6a7aa61
Merge topic 'policy-version-var'
...
1a35351125 Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
d723198539 Help: De-duplicate policy version documentation
e5d29e9e00 Help: Drop cmake_minimum_required pre-2.4 behavior
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !10343
2025-02-14 09:32:36 -05:00
Brad King
47689e9253
Merge topic 'policy-version-var' into release-4.0
...
1a35351125 Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
d723198539 Help: De-duplicate policy version documentation
e5d29e9e00 Help: Drop cmake_minimum_required pre-2.4 behavior
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !10343
2025-02-14 09:32:33 -05:00
Brad King
7d83672b2d
Merge topic 'doc-src-var-xref'
...
8905157694 Help: Link CMAKE_CURRENT_LIST_(DIR|FILE|LINE) to/from FUNCTION-equivalents
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10338
2025-02-14 09:20:00 -05:00
Brad King
1a35351125
Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
...
Provide packagers and end users with a way to try configuring projects that
have not been updated to set their policy version to a supported level.
Closes : #26698
2025-02-13 14:00:26 -05:00
Brad King
d723198539
Help: De-duplicate policy version documentation
2025-02-13 12:36:54 -05:00
Brad King
e5d29e9e00
Help: Drop cmake_minimum_required pre-2.4 behavior
...
The long outdated pre-2.4 compatibility behavior is no longer relevant
since CMake 4.0 dropped support for pre-3.5 compatibility.
2025-02-13 12:22:21 -05:00
Sanjiv Gupta
8ce6689d8b
Diab: Add WindRiver Systems's Diab C/C++ toolchain
...
Teach CMake to recognize Diab versions 5.9.x.x and above.
Closes : #26666
2025-02-13 10:15:00 -05:00
Nikita Nemkin
5d039f3be3
regex: Match ^ at most once in repeated searches
...
When doing successive matches, track the input start and current search
start positions separately to prevent the `^` anchor from matching in
the middle of the string. Add policy CMP0186 to provide compatibility.
Issue: #26629
Fixes : #16899
2025-02-13 20:00:02 +05:00
Alex Neundorf
8905157694
Help: Link CMAKE_CURRENT_LIST_(DIR|FILE|LINE) to/from FUNCTION-equivalents
2025-02-13 09:46:20 -05:00
Brad King
a0aa37180c
Merge topic 'find-cps-version'
...
3e6466eb16 find_package: Honor version requests when finding CPS packages
7a0e698384 find_package: Fix CPS version parsing
35a7ed125b find_package: Fix reporting of rejected CPS files' version
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !10297
2025-02-13 09:33:06 -05:00
Brad King
3f2386db2b
Merge topic 'find-cps-version' into release-4.0
...
3e6466eb16 find_package: Honor version requests when finding CPS packages
7a0e698384 find_package: Fix CPS version parsing
35a7ed125b find_package: Fix reporting of rejected CPS files' version
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !10297
2025-02-13 09:33:04 -05:00
Brad King
60bcd9cc50
Merge topic 'doc-header-only'
...
2d5f2c9311 Help: Make cmake-buildsystem(7) header-only examples consistent
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10333
2025-02-13 09:30:56 -05:00
Brad King
f45c1384cb
Merge topic 'doc-header-only' into release-4.0
...
2d5f2c9311 Help: Make cmake-buildsystem(7) header-only examples consistent
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10333
2025-02-13 09:30:55 -05:00
Matthew Woehlke
3e6466eb16
find_package: Honor version requests when finding CPS packages
...
Teach find_package to check a CPS package's version (when provided)
against a version request given to the find_package invocation.
2025-02-12 11:36:41 -05:00
Brad King
0492b52fd1
Merge topic 'instrumentation-build-snippet'
...
c8e319d08c instrumentation: Add experimental notes to docs
f777af7734 instrumentation: Update docs for available snippets
2299b2fcab instrumentation: Add build snippet
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !10328
2025-02-12 09:43:19 -05:00