Revise commit 97d13c3053 (Help: Improve diagnostics documentation,
2026-04-30, v4.4.0-rc1~227^2~2) to switch `cmake.py`'s sphinx api usage
from 7.4+ features to 4.0+ features.
Replace `parse_text_to_nodes` and `parse_content_to_nodes` with
equivalent, backwards compatible sphinx code using existing api calls.
Signed-off-by: John Parent <john.parent@kitware.com>
Extend (part of) commit f26e9fcbae (Help: Generate presets JSON schema,
documentation, 2026-04-08) to the `cmake-file-api(7)` page, for each of
the currently applicable object kinds (i.e., only those which have
undergone changes, which is predominantly the codemodel).
This standardization helps to improve both the readability and
maintainability of the document.
Backport libarchive commit `16ad931073` (cpio reader: Validate pathname
in record_hardlink, 2026-05-08).
Add a fuzzing test case to expose this to dynamic analysis tools.
5752bb41e3 libarchive: Avoid preprocessor symbol conflicts with boringssl on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12019
Update for LLVM/Clang commit `91cdd35008e9` ([clang] Improve nested name
specifier AST representation, 2025-08-09), which removed dedicated
`ElaboratedType` nodes in favor of storing the elaborated keyword and
name qualifier in separate nodes for the underlying type.
95edd93948 presets: Support loading from arbitrary file
81c22a67b6 presets: Factor out command line arguments
e75b62fd73 presets: Convert allowNoFiles to enum class
8476469b72 Help: Add cmake-workflow-option role
5e76987626 Help/presets: Use preset role for configurePreset references
2d8e8213d4 Help/presets: Improve include field formatting
43f5fc8ac8 Help, Tests: Consolidate presets terminology and references
c49ebb67da Help: Use POSIX slashes for 'generated by' in presets files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11886
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.
Backport libarchive commit `1f5454575f` (cab reader: Fix use of
uninitialized values from Huffman, 2026-04-23).
Add a fuzzing test case to expose this to dynamic analysis tools.
Versions of Python prior to 3.12 did not support nested quotes of
the same type in f-strings (see PEP 701). Use double quotes inside
the single-quote f-string.
Improve the CMake domain's 'preset' role, and reference resolving for
the same, to also accept explicit titles (i.e. 'title <ref>').
Also, remove some stray, inaccessible debugging code that was overlooked
in a previous round of improvements.
The description of diagnostics presets needs both the presets schema
spelling and the command-line spelling, but the initial generation logic
only used the former. This wasn't noticed because the spellings are the
same for single-word diagnostics, which were previously the only ones
being generated. Add the command-line spelling and update the
description templates.
Modify the script that generates the CMake presets schema to extract the
list of available diagnostics from the `cmDiagnostics.h` header and
generate the relevant properties. This information is combined with a
partial set that remains in the YAML for those diagnostics whose
definitions differ from what is easily generated. While these special
cases will remain, the addition of new diagnostics should no longer
require manual updates to the YAML. (The presets version log will still
require manual updates.)
Add an additional state to the cmake instance to track diagnostics. Use
this to initialize any new/reset states we create so that other contexts
will inherit the diagnostic state from presets / command-line options.
Modify the front-end to map presets and -W command-line options to
manipulation of this new diagnostic state. Remove old members for
storing diagnostic state. Rework how diagnostic state is persisted.
Deprecate old, non-standard spellings for manipulating diagnostics.
Deprecate old 'dev' spelling for CMD_AUTHOR.
Note that this is a work in progress. Messaging has not yet been
updated, so the new state is not yet being used to control diagnostics,
and some of the logic to update the old state has been stripped (and
will eventually be removed entirely). Backward compatibility support for
the deprecated CMAKE_{WARN,ERROR}_DEPRECATED variables is only partially
implemented. The GUI's interface for manipulating warnings is partially
broken and needs to be overhauled. These tasks are being done in
separate commits in order to minimize review burden and keep the changes
per commit / per merge request more manageable.
Add a new CMake domain role for referencing fields in CMake presets.
This has two main purposes. First, it replaces generic references (which
were excessively long and required explicit titles) and acts as an
improved version of the `ref` role by allowing the always-present
`CMakePresets.` prefix to be elided. Second, unlike generic references
which silently degrade to broken links that are only caught by
`linkcheck`, broken references are flagged immediately in regular Sphinx
builds. Therefore, this both improves presentation by bringing line
lengths back under control, and reduces errors by making bad references
immediately detectable.
There is also a small change in rendering, as field references are now
rendered as literals. This is consistent with how fields are mentioned
in prose when they are not linked.
Replace the CMake presets schema.json with a YAML document, from which
both the JSON schema and (most of) the reST documentation are generated.
This achieves three main goals. First, the YAML document is much closer
to being human-readable than the JSON schema. Second, the JSON and reST
prose (when the latter differs) are contained in the same file, in most
cases adjacent (and at worst, still nearby) rather than in separate
files, which should greatly facilitate keeping the two in sync. Third,
changes are monumentally easier, as changes merely need to annotate the
version(s) to which variants apply, rather than creating entirely
separate schema trees for each variant.
Since requiring Python as part of the build process is not desired,
the outputs are kept in the source repository. This is consistent with
other areas which are seldom updated and require special tools, such as
the lexer.
While this does not represent any functional change for users, some
grammatical edits and other such editorial improvements have been made
in the process of transferring everything to the new YAML. However,
these are mainly incidental rather than representative of an attempt at
a thorough editorial pass.
Finally, for clarity, monkey-patch `sphing.domains.changesets` and add
additional 'version modified' directives with slightly tweaked text to
identify changes to the presets schema. These are nearly identical to
the built-in directives, but use the text 'in presets version N' rather
than 'in version N[.N]'.
1b946dfbfe Merge branch 'backport-4.2-find_package-stack' into find_package-stack
e8ae3645db Merge branch 'backport-4.2-find_package-stack' into find_package-stack
aae02ee60a find_package: Share package information among copies of package stack
a789c21100 Merge branch 'backport-4.2-find_package-stack' into find_package-stack
9387988626 find_package: Save package information only after successfully loading it
561ece2407 cmFindPackageStack: Restore pure value semantics
e935ed22fb find_package: Share package information among copies of package stack
5aa649d5f6 find_package: Save package information only after successfully loading it
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11887
A stack entry's storage may be shared by other copies, so mutation is
incompatible with value semantics. We've migrated the motivating use
case to another approach.
Revert commit b3873b8272 (cmFindPackageStack: Allow controlled mutation,
2025-07-29, v4.2.0-rc1~438^2) and commit f2bdc2176f (cmStack: New,
mutable stack class, 2025-07-29, v4.2.0-rc1~438^2~1). Record their
parent as a second parent of this commit so `git blame` can see the
original history of the restored content.
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.
We document Zstd compression levels up to 19. However, the zip
format defines compression level range 0 through 9. libarchive
scales it into range `ZSTD_minCLevel()` to `ZSTD_maxCLevel()`.
Zstd compression levels beyond 19 require large memory allocations
which may fail on some platforms, such as 32-bit Linux.
Fixes: #27712
Since commit cbf71b21b2 (cli tar: support multithreading compression,
2025-11-28, v4.3.0-rc1~393^2~1) we offer command-line options to control
compression threading. Enable them when used with Zstd.
On AIX this causes allocation failures similar to those we avoid via
commit 1ba3444fd8 (libarchive: Limit 7zip and zstd compression level to
6 on AIX, 2025-12-11, v4.3.0-rc1~335^2~1), so leave threading off there
pending further investigation.
Issue: #27712