Commit Graph
1856 Commits
Author SHA1 Message Date
Brad King e9e23c512e Merge topic 'list-transform-apply-only'
651f82642c Add APPLY action for list(TRANSFORM)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !11926
2026-04-24 09:03:50 -04:00
Mickaël Germain 651f82642c Add APPLY action for list(TRANSFORM)
Add a new APPLY action to list(TRANSFORM) that invokes a user-defined
function or macro for each element of the list, enabling arbitrary
per-element transformations.

The callable receives the current element value and an output variable
name, and must set the output variable in PARENT_SCOPE to the
transformed value.

Includes documentation, release notes, and tests for both function
and macro callables, OUTPUT_VARIABLE, error cases, and selector
combinations (AT, FOR, REGEX).
Refs: #27761
2026-04-22 19:04:12 -07:00
Brad KingandSerguei E. Leontiev a95fae2d36 PellesC: Add support for ASM_POASM language assembler
The Pelles C compiler does not support ASM, and the `poasm` assembler
uses a distinct syntax.  Add a dedicated language as we do for similar
cases from other vendors.  Leave documentation commented out for now
because the PellesC toolchain support in general is not yet documented.

Fixes: #27758
Issue: #21536
Co-authored-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-04-22 14:42:00 -04:00
Brad King b0bf7182f4 Help: Format list of supported languages as a definition list
This gives a natural place to put `versionadded` directives
and notes about specific languages.
2026-04-22 14:35:04 -04:00
Brad King cf11d9f349 Merge topic 'json-partial-equals'
b14da400de string(JSON): Add PARTIAL_EQUAL for subset style JSON comparisons

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11725
2026-04-22 09:17:19 -04:00
Brad King 8c7edfcc88 Merge topic 'ctest_configure_preset_option'
383802d93a ctest_configure: add PRESET option
dc84ea229f ctest_configure: move command construction into separate function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11916
2026-04-21 08:49:36 -04:00
Taylor Sasser b14da400de string(JSON): Add PARTIAL_EQUAL for subset style JSON comparisons
Fixes: #27641
2026-04-21 08:41:49 -04:00
Zack Galbreath 383802d93a ctest_configure: add PRESET option
Allow users to specify a configure preset when using CTest dashboard scripts.
Related to Issue #27630
2026-04-20 12:54:53 -04:00
Brad King 1bfcd47309 Help: Replace C++ reference links with their permanent redirects 2026-04-20 10:50:31 -04:00
scivision 3f3ba04d81 file(READ_SYMLINK): Add RESULT option to capture errors
Closes: #27753
2026-04-17 10:51:28 -04:00
Brad King 25dd69d2f2 Merge topic 'file-link-copy-fix'
57ca3dc521 file(CREATE_LINK): Fix CMP0205 to not remove content behind directory symlink
a6470b4681 Help/file: Clarify behavior change with CMP0205
b894942d3e file(CREATE_LINK): Revise CMP0205 warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11925
2026-04-16 09:19:27 -04:00
Tyler Yankee a6470b4681 Help/file: Clarify behavior change with CMP0205 2026-04-15 14:03:39 -04:00
Brad King d5103f3e80 Merge topic 'FILE_SET-target-is-framework'
2dda1f21ab FILE_SET: enhance FRAMEWORK compatibility checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11929
2026-04-14 10:30:33 -04:00
Tyler Yankee cec6248a94 Help/ctest_*: Improve documentation around the edges
Improve standardization and cross-references. This doesn't make any
substantial changes to the existing prose.
2026-04-13 14:32:01 -04:00
Marc Chevrier 2dda1f21ab FILE_SET: enhance FRAMEWORK compatibility checks
The SOURCES file set type is compatible with the FRAMEWORK target.
Add check at generation time.

Fixes: #27705
2026-04-13 17:55:36 +02:00
Brad King 9ec879524a Merge topic 'doc-lang-link-flags'
c8b6725977 Help: Mention CMAKE_<LANG>_LINK_FLAGS where relevant

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11905
2026-04-10 11:33:46 -04:00
Tyler Yankee c8b6725977 Help: Mention CMAKE_<LANG>_LINK_FLAGS where relevant
Also, correct the documentation added in commit 98f9874703 (cmake:
Add per-language link flags for all target types, 2025-12-17) by
placing the variables in the proper section of cmake-variables(7).

Issue: #21934
2026-04-07 10:14:28 -04:00
Tyler Yankee 6ff2057b93 Help/if: Improve formatting
Consolidate the description of precedence during evaluation. Use xrefs
to improve syntax highlighting. Remove an outdated `versionadded`
directive for CMake 2.6.
2026-04-03 09:36:04 -04:00
Brad King ad50d3e3d8 Merge topic 'short-cmake-option-refs'
3d82ccbe0d Help: Add roles to abbreviate command-line options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11883
2026-04-01 13:41:12 -04:00
Matthew Woehlke 3d82ccbe0d Help: Add roles to abbreviate command-line options
Add a handful of helper roles that allow many more command-line option
references to be written without explicit targets. Specifically, what
used to be written ':option:`--foo[=bar] <program --foo>` can now be
written ':program-option:`--foo`'. This allows many such references to
be significantly shortened.

For now, supported programs are 'cmake', 'cpack'. 'ctest',
'cmake--build' and 'cmake--install', which should cover most cases, but
more can be trivially added. Additionally, this does not make a
concerted effort to replace all existing uses, as it is intended mainly
for use in future updates.
2026-03-31 12:56:16 -04:00
Marc Chevrier c386aaebf8 FILE_SET: install and export SOURCES file set type 2026-03-31 09:50:09 +02:00
Marc Chevrier 5c5b68f44e FILE_SET: Add support for the SOURCES type
Fixes: #27550
2026-03-31 09:49:59 +02:00
Daniel Pfeifer 4e34426fb3 TestDriver: Add '-N' option to print all tests 2026-03-26 10:36:22 -04:00
Daniel Pfeifer b7f83c37a4 create_test_sourcelist: Document command line arguments 2026-03-26 10:36:22 -04:00
Daniel Pfeifer 8600ce6547 discover_tests: Add documentation 2026-03-26 10:36:22 -04:00
AJIOB 97455c3d7e file: Add ARCHIVE_* options to specify pathname encoding
Issue: #26903
2026-03-24 14:07:21 -04:00
Brad King 0d5238a4e7 Merge topic 'doc-long-line'
899122e776 Help: Wrap long line in 4.3 versionadded note

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11865
2026-03-24 14:02:49 -04:00
AJIOB 899122e776 Help: Wrap long line in 4.3 versionadded note 2026-03-24 13:37:38 -04:00
Brad King d409bdbcc2 Merge topic 'custom-target-exe-deps'
858fdd426b add_custom_command: Disallow exe-suffixed targets in DEPENDS
58ab03c031 add_custom_command: Update dependency search heuristics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11801
2026-03-24 09:11:34 -04:00
Brad King 6bb0ec7d06 Merge topic 'patch-sbom-2'
d2aab1839e Help: Fix install(PACKAGE_INFO) and install(SBOM) argument typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11850
2026-03-23 10:33:32 -04:00
Tyler Yankee 858fdd426b add_custom_command: Disallow exe-suffixed targets in DEPENDS
Two targets whose names differ only in a `.exe` suffix create a
conflict when adding target- and file-level dependencies for a custom
command. Add CMP0212 to provide compatibility with the old behavior.

Issue: #27612
2026-03-23 09:50:46 -04:00
Peter Kokot d2aab1839e Help: Fix install(PACKAGE_INFO) and install(SBOM) argument typos
In commit 51f39a0f32 (Help: Fix install(SBOM) argument typo, 2026-02-27,
v4.3.0-rc2~8^2) the typo was fixed in the wrong signature.  Revert that
and fix the correct signature.
2026-03-23 09:45:17 -04:00
Marc Chevrier 167e903c15 FILE_SET: enforce uniqueness of files
A file should be unique for a target if specified as part of a file set.

Issue: #27035
2026-03-23 08:37:05 -04:00
Brad King 671ada703b Merge topic 'cmake-diagnostics'
a78f356ed9 Diagnostics: Shorten type names
2b7ee7137b cmStateSnapshot: CanPop* should be const
a0612aeb5d Diagnostics: Add cmake_diagnostic command
e74fbb3d44 Diagnostics: Implement diagnostic stack
d80a38e524 cmMakefile: Use enumeration for policy scope

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11818
2026-03-20 08:44:26 -04:00
Matthew Woehlke a0612aeb5d Diagnostics: Add cmake_diagnostic command
Add command to manipulate the new diagnostic stack/state introduced in
the previous commit. Start adding documentation for the system as a
whole.
2026-03-19 11:29:44 -04:00
Brad King 3a5ce567ac Merge topic 'patch-config-mode-order'
697486583f find_package: Clarify CPS search priority

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11832
2026-03-19 11:26:16 -04:00
Peter Kokot 697486583f find_package: Clarify CPS search priority
When using `find_package()` in config mode, as of CMake 4.3, first the
CPS files are searched and then config files.
2026-03-18 17:36:20 -04:00
Matthew Woehlke e74fbb3d44 Diagnostics: Implement diagnostic stack
Create a stack state for managing diagnostics. This will eventually
replace some of the global state used for diagnostics, as well as
providing a mechanism to add additional diagnostics.

For now, this is only the stack manipulation with a bare minimum of
interface logic (in particular, the `block` and `include` commands).
Nothing actually looks at the diagnostic state yet, and the primary user
interface does not yet exist (although there are some references to it
already).
2026-03-18 14:32:21 -04:00
Brad King f43f7af16a Merge topic 'execute_process-environment'
d7ab03d093 execute_process: Add options for modified environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !11773
2026-03-13 09:57:40 -04:00
Brad King cc2f64cac6 Merge topic 'doc-custom-synopsis'
acd6b7372c Help/add_custom_command: Add synopsis and signatures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11806
2026-03-12 16:08:51 -04:00
Daniel Pfeifer d7ab03d093 execute_process: Add options for modified environment 2026-03-12 19:17:24 +01:00
Tyler Yankee acd6b7372c Help/add_custom_command: Add synopsis and signatures 2026-03-12 14:13:16 -04:00
Peter Kokot 1ce6072907 install: Add module libraries to the list of artifact kind 2026-03-07 20:16:35 +01:00
Brad King 600bdf1982 Merge topic 'doc-policy-version'
e3f1dc2a57 Help: Clarify what policies a "policy version" sets to NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Tyler Yankee <tyler.yankee@kitware.com>
Merge-request: !11751
2026-02-27 17:43:25 -05:00
Brad King cac8c7e16c Merge topic 'doc-policy-version' into release-4.3
e3f1dc2a57 Help: Clarify what policies a "policy version" sets to NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Tyler Yankee <tyler.yankee@kitware.com>
Merge-request: !11751
2026-02-27 17:43:23 -05:00
Nuno Nobre e3f1dc2a57 Help: Clarify what policies a "policy version" sets to NEW
Also remove a duplicate sentence.
2026-02-27 16:57:36 -05:00
Peter Kokot 51f39a0f32 Help: Fix install(SBOM) argument typo 2026-02-27 16:51:39 -05:00
Tyler Yankee 8a74c4c6dc Help: Add 4.3 version tags for string JSON operations
Amend commit 15973ff247 (string(JSON): Add GET_RAW mode, 2025-12-16)
and commit 06e6f1e69f (string(JSON): Add STRING_ENCODE mode,
2025-12-16).

Fixes: #27633
2026-02-22 17:00:30 -05:00
Brad King 1202254cd5 Merge topic 'improve-doc-consistency'
277c12a4c7 Help: Improve command usage formatting consistency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11687
2026-02-16 08:43:11 -05:00
Matthew Woehlke 277c12a4c7 Help: Improve command usage formatting consistency
Try to be a bit more consistent about:

- Placing angle brackets around text which serves as a placeholder
  rather than being literal.

- Using curly brackets rather than angle brackets to denote groups where
  one of the options is required.

- Describing optional list arguments like `<x>...` rather than
  `[<x>...]`. (Instances of lists not associated with keywords are
  intentionally left as-is, however.)

Also, teach our CMake lexer to understand curly braces used as above
(prior uses were only in parsed literals without syntax highlighting),
and to highlight them (and remaining uses of angle braces) as the type
Punctuation rather than the type Operator, for consistency with square
braces.
2026-02-13 12:54:37 -05:00