19 Commits
Author SHA1 Message Date
Daksh Mamodiya 0862819756 bash-completion: Fix spurious 'following' target completion candidate
The '--target' completion parsed 'cmake --build --target help'
with a sed pattern whose leading '...' matched any three
characters, so the header line yielded a bogus 'following'
candidate.  Anchor the pattern to literal dots.

Also note in the user-interaction guide that 'make' target
tab-completion is provided by the external bash-completion
package, which may hide the plain '<target>' name when a
'<target>/fast' variant exists, and recommend
'cmake --build --target' completion instead.

Fixes: #27873
2026-08-05 05:51:19 +02:00
Tyler Yankee 95edd93948 presets: Support loading from arbitrary file
Allow CMake, CTest, and CPack to read presets from a path given by
command-line argument instead of always requiring `CMakePresets.json`
or `CMakeUserPresets.json` in the source tree. This makes the presets
feature more extensible to cases in which the user doesn't have access
to the presets defined in the source tree (e.g., if the source tree is
not writable).

For now, there is no equivalent implementation of such an option in the
`cmake-gui`, nor for the recent presets functionality implemented in
`ctest_configure` and `ctest_build`.

Fixes: #27329
2026-04-30 08:04:26 -04:00
Tyler Yankee 43f5fc8ac8 Help, Tests: Consolidate presets terminology and references
References to `CMake[User]Presets.json` should correspond to behavior
pertaining to those files in particular, while references to presets
files generally should be disambiguated from that.

Re-spell "preset file" to "presets file" where applicable.

Make a few references to `cmake-presets(7)` more consistent.

Issue: #27329
2026-04-30 07:49:40 -04:00
Matthew Woehlke ca5d569524 Diagnostics: Switch state to new system
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.
2026-04-14 12:42:33 -04:00
Alex Turbov 45b374234a Help: fix typo found by the sphinx-lint plugin of pre-commit 2025-06-20 14:26:39 -04:00
Ben Boeckel b634998727 Help: add and make references to generators consistent 2025-06-12 21:25:24 +02:00
Ben Boeckel dcf9a66ffe cxxmodules: plumb control data for exporting build databases
This includes the target property, its initializing variable, its
initializing environment variable, and updating related docs to mention
the new bits.
2024-08-27 12:37:36 -04:00
Brad King b768a5e23b Help: Disambiguate cmake(1) program modes in Sphinx option references
Define the entry point to each mode as an option for the `cmake`
program, but reference the options for that mode as part of stand-in
`cmake-<mode>` programs.
2022-10-05 15:27:40 -04:00
tocic 83c89cea5a Help: Fix minor typos in guides 2022-09-04 23:04:49 +10:00
Alex Turbov 04843d743e Help: Replace a bunch of more `--option to :option:` role 2022-08-04 19:34:45 +04:00
Alex Turbov b57f27b087 Help: Replace mentions of `-T and -A` options with role 2022-08-04 19:34:45 +04:00
Alex Turbov d25b232dee Help: Replace mentions of `-G option with :option:-G` role 2022-08-04 19:34:45 +04:00
Alex Turbov 63940e1cab Help: Replace mentions of `-C option with :option:-C` role 2022-08-04 19:34:44 +04:00
Tim Hutton c16509907c Help: Update to VS ClangCL toolset in user-interaction example
As of VS 2019 the toolset is now called `ClangCL`.  The toolset `LLVM`
is no longer supported.

Issue: #20415
2021-02-01 10:21:03 -05:00
Kyle Edwards c436aaaad1 Help: Move CMakePresets.json documentation into a separate file 2020-10-19 10:25:57 -04:00
Kyle Edwards 4bdc1c0a2c Help: Update user interaction guide with presets info 2020-10-06 16:11:50 -04:00
Betsy McPhail 0aea38d25e Help: Change User Interaction image paths to be relative to source file 2020-09-25 14:45:01 -04:00
Ben Boeckel e4f398e0af Help: add alt text to embedded images 2020-05-07 13:25:57 -04:00
Stephen Kelly bd681fee7a Help: Add guides for user interaction
Add some prose to the documentation index page to guide readers to the
major manuals and guides.

Add a new "User Interaction Guide" to help the class of new user
who wishes to build a project with CMake for the first time, such as
after cloning a repo from a git repository.

Add a new "Using Dependencies Guide" to help the class of new
user who wishes to consume a SDK provided by a third party and needs a
starting point.  This is a different type of user to the user who wishes
to create their own project from scratch (addressed by the
`cmake-buildsystem(7)` manual) as each will encounter needs for
information discovery in a different order.
2020-01-13 11:04:55 -05:00