Commit Graph
1881 Commits
Author SHA1 Message Date
Brad King 0d2e9ce13c Merge topic 'instrumentation-data-version-doc'
1d0f587062 instrumentation: Clarify API and Data version distinction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12091
2026-05-21 09:45:18 -04:00
Martin Duffy 1d0f587062 instrumentation: Clarify API and Data version distinction
The instrumentation docs were unclear about the difference between API
and Data version, with the hierarchy of the table of contents being
particularly misleading.

Rework `cmake-instrumentation` manual and `cmake_instrumentation` command
documentation to be more clear.
2026-05-20 15:20:09 -04:00
Brad King 9d94a2abe6 Merge branch 'backport-cps-fix-default-dest' into cps-fix-default-dest 2026-05-19 15:26:46 -04:00
Matthew Woehlke ed6e9abf98 CPS, SBOM: Fix default output destination
- Change default CPS install path on Windows from `cps` to `cps/<name>`,
per community recommendation that only paths containing the package name
should be considered as "officially" supported search locations (see
https://github.com/cps-org/cps/issues/79#issuecomment-2831102822).

- Change `export` to write to a subdirectory that allows the build
tree to be used as a search root.

- Change SBOM destinations to be consistent with the preceding.

Issue: #27785
2026-05-19 13:31:56 -04:00
Brad KingandSerguei E. Leontiev 090e754a34 PellesC: Document support for this compiler
This was left out of commit b7a5f2732d (PellesC: Add minimal support for
this C compiler, 2026-04-03) because the implementation was not usable
in general.  It is now.

Closes: #21536
Co-authored-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-05-15 12:06:46 -04:00
Brad King 08bf1b6985 Merge topic 'ctest_commands_presets_file'
08dc82ceb3 ctest: add PRESETS_FILE option to CTest commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12042
2026-05-14 08:53:25 -04:00
Brad King 011fc8be63 Merge topic 'feature/list-functor-no-macro'
96c9a9c67d list: Reject macros as APPLY/PREDICATE/COMPARATOR arguments
08288eb14a list: Extract RequireFunction helper for command validation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11997
2026-05-14 08:45:19 -04:00
Zack Galbreath 08dc82ceb3 ctest: add PRESETS_FILE option to CTest commands
Allow CTest script authors to use presets from arbitrary files.
2026-05-12 15:49:39 -04:00
Mickaël Germain 96c9a9c67d list: Reject macros as APPLY/PREDICATE/COMPARATOR arguments
Fixes: #27781
2026-05-12 12:30:43 -07:00
Daniel Pfeifer 585e0d5878 ctest_update: Add options VERSION_ONLY and VERSION_OVERRIDE 2026-05-12 13:45:00 +02:00
Brad King 3b24c78ed9 Merge topic 'ctest_test_preset_option'
ef0d2ca6bb ctest: add PRESET option for ctest_test() and ctest_memcheck()
f9c831dad9 ctest: encapsulate loading of options from test preset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12017
2026-05-11 11:12:42 -04:00
Brad King 61680b3b44 Merge topic 'cmake-diagnostics-variables'
72e7305c3e Diagnostics: Handle CMAKE_{WARN,ERROR}_DEPRECATED
be057c5a01 cmVariableWatch: Use enum for access type
cba542f32c cmake.cxx: Organize includes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11948
2026-05-08 07:44:05 -04:00
Zack Galbreath ef0d2ca6bb ctest: add PRESET option for ctest_test() and ctest_memcheck()
Allow users to specify a test preset when using CTest dashboard scripts.

Fixes #27630
2026-05-07 22:08:41 -04:00
Matthew Woehlke 72e7305c3e Diagnostics: Handle CMAKE_{WARN,ERROR}_DEPRECATED
Update documentation for aforementioned variables, as their use is
deprecated under the new diagnostic system. Introduce a policy which
reintroduces their use to control specific deprecation diagnostics if
the policy is not NEW.

Note that this means there is NO synchronization between the variables
and the new diagnostic state.
2026-05-07 11:07:27 -04:00
Mickaël Germain 3dc32ac62b list(SORT): Add COMPARATOR option for user-defined comparisons
Allow users to provide a custom comparison function for `list(SORT)`.
The comparator is validated for strict weak ordering at runtime to
produce a clear CMake error rather than a platform-dependent abort.

Closes: #27761
2026-05-06 15:09:06 -04:00
Brad King ffe0edc092 Merge topic 'list-predicate'
15340d6a96 list(FILTER): Add PREDICATE mode
c7af6e94d8 list(TRANSFORM): Add PREDICATE selector
0f30e0fe1c Help: Fix indentation of list(FILTER) docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11945
2026-05-05 10:58:32 -04:00
Brad King 1c4ef7291f Merge topic 'cmake-diagnostics-doc'
95f7f84609 Help: Fix CMD_INSTALL_ABSOLUTE_DESTINATION documentation
a882ec84ec cmDocumentation: Add diagnostics
97d13c3053 Help: Improve diagnostics documentation
3cccce8ca2 Help: Add developer documentation for new diagnostics
ffe4c2a8ff Help: Fix developer documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !11996
2026-05-04 10:32:28 -04:00
Mickaël Germain 15340d6a96 list(FILTER): Add PREDICATE mode 2026-05-01 18:55:07 -07:00
Mickaël Germain c7af6e94d8 list(TRANSFORM): Add PREDICATE selector
Add a new `PREDICATE` selector to `list(TRANSFORM)` that uses a
user-defined function or macro to decide which elements to transform.

The predicate callable receives each element value and an output
variable name.  It must set the output variable to a truthy or falsy
value in PARENT_SCOPE; only elements for which the predicate returns
true are passed to the transform action.

Adds a shared PredicateEvaluator helper class used by both TRANSFORM
PREDICATE and (in a subsequent commit) FILTER PREDICATE.

Includes parser wiring, error and success tests covering all existing
actions (TOUPPER, TOLOWER, REPLACE, STRIP, GENEX_STRIP, APPEND,
PREPEND, APPLY) combined with the PREDICATE selector.

Issue: #27761
2026-05-01 18:54:53 -07:00
Brad King 0f30e0fe1c Help: Fix indentation of list(FILTER) docs 2026-05-01 09:47:12 -04:00
Matthew Woehlke 97d13c3053 Help: Improve diagnostics documentation
Make diagnostics into Sphinx objects so that they can be more readily
cross-referenced. (This is also needed to enable --help-diagnostic.)
Update various places that can make use of the same. Significantly
expand the documentation on controlling diagnostics.
2026-04-30 15:36:23 -04:00
Joseph Snyder a7780d1b9c ctest: Add a CoverageTool setting to enable integration with llvm-cov
Add a `CTEST_TEST_COVERAGE_TOOL` variable to tell CTest to integrate
with `llvm-cov` source-based code coverage by setting the
`LLVM_PROFILE_FILE` environment variable for each test.

Issue: #26932
2026-04-30 14:22:26 -04:00
Brad King a979d8eb3d Merge topic 'error_on_absolute_install_paths'
39a56136a3 Diagnostic: Add warn or error on absolute install paths
fd76089631 cmInstallFileSetGenerator: Only support per config Destination.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11882
2026-04-30 09:17:13 -04:00
Robert Maynard 39a56136a3 Diagnostic: Add warn or error on absolute install paths
Add `-Winstall-absolute-destination` diagnostic to warn or
error when an install command has an absolute destination.

This allow projects to enforce the best practice of not allowing
absolute install DESTINATIONS.
2026-04-29 09:22:29 -04:00
Zack Galbreath 348ff1938b ctest_build: add PRESET option
Allow users to specify a build preset when using CTest dashboard scripts.

Issue: #27630
2026-04-27 17:15:11 -04:00
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