Commit Graph

210 Commits

Author SHA1 Message Date
Nikita Nemkin
9c963de998 Help: Remove stray spaces and one colon 2025-01-31 12:23:29 -05:00
Brad King
a832d31474 Merge topic 'cmake_sarif_output'
abbe41578d cmake: Add SARIF diagnostics output support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !10139
2025-01-30 08:43:11 -05:00
Daniel Tierney
abbe41578d cmake: Add SARIF diagnostics output support
Closes: #26587
2025-01-29 08:43:19 -05:00
Alex Turbov
bc4c71627a
Help: Fix typos found by the rst-backticks hook
The corresponding `pre-commit` configuration is coming in the
separate MR.

Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2025-01-27 01:43:26 +04:00
Brad King
bd176b430c Renumber post-3.31 development from 3.32 to 4.0
Issue: #26613
2025-01-16 09:18:21 -05:00
Marc Chevrier
7907c83175 Link step: Add LINK_WARNING_AS_ERROR target property
Add a way to specify, in a portable way, to raise an error for any
warning during the link step. For that purpose, define:
* CMAKE_LINK_WARNING_AS_ERROR variable
* LINK_WARNING_AS_ERROR target property

Fixes: #25343
2024-11-12 15:11:53 +01:00
Kevin Tolle
b80aa1d3a3
preset: Easier command line interface for Workflow Presets
A positional option allows 'cmake --workflow --preset <preset>' to be
shortened to 'cmake --workflow <preset>'.

Fixes: #26270
2024-10-05 16:08:44 +10:00
Martin Duffy
1df94443fe fileapi: Add support for user-wide queries
Fixes: #19168
2024-08-22 10:24:23 -04:00
scivision
d03bb13839
Help: version 3.16 added cmake --log-level 2024-08-08 08:29:43 -04:00
Brad King
077691942a Merge topic 'cmake-list-cached-variables'
c55239e286 cmake: Add flag to list cache entries matching a regex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9644
2024-07-24 10:00:30 -04:00
Min Hsu
c55239e286 cmake: Add flag to list cache entries matching a regex
Add a `-LR[A][H] <regex>` flag with similar functionality to `-L[A][H]`,
but instead of listing all cached variables, it show only specific
variables that match the name regex.
2024-07-23 10:19:22 -04:00
Martin Duffy
159ba027b9 Install: Add parallel installation option
Fixes: #26000
2024-07-15 11:49:29 -04:00
Craig Scott
9299cbbdb4
FetchContent: Force cmake --fresh to re-execute direct population steps
Issue: #25468
2024-06-07 18:12:12 +10:00
Craig Scott
15950197b0
Help: Presets read by --preset must be in the source directory
Issue: #21911
2024-06-02 15:03:15 +10:00
Brad King
530deed998 Merge topic 'cmake-E-cat-stdin'
ab72846794 cmake -E cat: Add ability to print standard input

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8942
2023-11-06 10:35:45 -05:00
權少
c5388bd320 CMakeFindPackageMode: Link to cmake --find-package documentation 2023-11-03 10:17:38 -04:00
Kyle Edwards
ab72846794 cmake -E cat: Add ability to print standard input 2023-11-03 09:03:25 -04:00
scivision
449f5da373
Help:cmake(1): add versionadded back to 3.17 2023-09-24 14:41:13 -04:00
Glen Chung
a9a592f96e cmake: Add debugger
- Depends on cppdap and jsoncpp.
- Add --debugger argument to enable the Debugger.
- Add --debugger-pipe argument for DAP traffics over named pipes.
- Support breakpoints by filenames and line numbers.
- Support exception breakpoints.
- Call stack shows filenames and line numbers.
- Show Cache Variables.
- Show the state of currently defined targets,
  tests and directories with their properties.
- Add cmakeVersion to DAP initialize response.
- Include unit tests.

Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>
2023-05-30 09:46:12 -04:00
scivision
f0e60ea867
Help: cmake (1): put modern configure signature first
recommend compact, most robust signature first. So many people are
still using the multi-step pre-3.13 way of initializing a build.
Rather than simply

  cmake -Bbuild

which is one step instead of 3 just to configure a new project.
2023-02-18 20:13:40 -05:00
Brad King
51c7917072 Merge topic 'deprecate-extra-generators'
ef5a4d964b Deprecate "extra" generators in favor of cmake-file-api(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8211
2023-02-16 11:44:05 -05:00
scivision
bf5512ef51 Help:cmake -E time: note overhead included 2023-02-15 10:53:14 -05:00
Brad King
ef5a4d964b Deprecate "extra" generators in favor of cmake-file-api(7)
The "extra" generators were created in CMake's early years to provide
support for users of specific IDEs by directly generating their project
files alongside make or ninja files.  Nowadays the file-api provides a
more generic, maintainable, well-tested, and robust way for IDEs to view
CMake project build trees.  Deprecate the legacy "extra" generators to
encourage the corresponding IDEs to use the file-api.

Fixes: #19090
2023-02-15 10:48:26 -05:00
scivision
615ba911c4 Help: cmake(1): sleep can have floating point value 2023-02-14 13:38:59 -05:00
scivision
d3ece40602 Help: cmake (1): remove -E server as not available
... since CMake 3.20
2023-02-06 09:57:57 -05:00
Robert Maynard
c1170b5602 cmake: Add -E copy_directory_if_different
Fixes #21584
2023-01-12 08:39:41 -05:00
Kyle Edwards
8d9069e5b6 cmake -E copy: Add support for -t argument
Fixes: #23543
2022-11-15 07:47:07 -05:00
Alex Turbov
c9eb090902
Help: Use caption option of code-block for JSON trace format snippets 2022-11-07 22:55:06 +04:00
Alex Turbov
029210730a
Help: Use role :program:
When mention execitable names use Sphinx semantic role `:program`
instead of ``executable`` or **executable**.
2022-11-06 04:28:21 +04:00
Kyle Edwards
7ecbe324b0 cmake --workflow: add --fresh option
Fixes: #24073
2022-10-26 12:01:25 -04:00
Michael Hirsch
36d76ed07c Help: cmake(1), ctest(1), versionadded for key flags 2022-10-21 10:55:15 -04:00
Alex Turbov
a0349eb13f Help: Make cmake(1) sub-command options look like other options
Particularly,

- options for `cmake -E env`
- options for `cmake -E tar`
2022-10-12 09:29:48 -04:00
Craig Scott
f8b3b24915
Help: Minor grammar, typo and formatting cleanups 2022-10-09 13:34:05 +11:00
Brad King
2133cf2c8e Merge topic 'try_compile-more-debug-logging'
7e6b2a92a0 try_compile: Report build dir with --debug-trycompile
cbf3252975 Tests: Remove stray debugging flag from RunCMake.CheckCompilerFlag case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7746
2022-10-06 08:45:25 -04:00
Matthew Woehlke
7e6b2a92a0 try_compile: Report build dir with --debug-trycompile
When `--debug-trycompile` is enabled, issue a log (with trace) for every
`try_compile` noting what directory is being used for the compilation.
This will make it easier to find the corresponding artifacts.

Closes: #24022
2022-10-06 08:13:03 -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
Matthew Woehlke
3801785cc3 Help: Improve try_compile debug documentation
Update the --debug-trycompile documentation to account for recent
changes to try_compile. Mention where in the build tree to find
artifacts when using said option.
2022-10-03 11:44:58 -04:00
Kyle Edwards
374d82bbcd cmake: Add --workflow mode
Fixes: #23118
2022-09-27 11:09:06 -04:00
Brad King
01e95efc34 Merge topic 'cmake-presets-package'
a8d73085f4 CPack: Add support for presets
b699610df4 cmCMakePresetsGraph: Add package presets
215b9148eb CMakePresets.json: Fix formatting of --list-presets=all

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7621
2022-09-02 09:04:13 -04:00
Brad King
18a8aa079c Merge topic 'E-capabilities-tls'
d0bb3286f0 cmake -E capabilities: Tell whether TLS is enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7593
2022-09-02 09:01:51 -04:00
Kyle Edwards
d0bb3286f0 cmake -E capabilities: Tell whether TLS is enabled
Fixes: #20507
2022-09-01 11:20:14 -04:00
Kyle Edwards
a8d73085f4 CPack: Add support for presets
Fixes: #23117
2022-08-31 11:56:21 -04:00
Brad King
6c7f3c839b Merge topic 'feature/cmake-man-page-short-option-first'
536a25fedc Help: Convenient declaration for `-j, --parallel` option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7588
2022-08-19 07:21:03 -04:00
Alex Turbov
536a25fedc
Help: Convenient declaration for -j, --parallel option 2022-08-18 14:18:49 +04:00
Alex Reinking
c9d70a7cc3 cmake -E env: Add --modify flag
When `cmake -E env` is given the `--modify` flag, try to parse the
following argument as an `ENVIRONMENT_MODIFICATION` operation and apply
it to the environment.

This generalizes `--unset=`:

1.  When implementing `ENVIRONMENT_MODIFICATION` features for other CMake
    commands, the `MYVAR=OP:VALUE` strings do not need to be translated
    to OP-specific flags.
2.  This provides a natural and consistent extension point to introduce
    new operations without introducing very many flags.
3.  Users need to learn only one syntax to access the same functionality.

There is one difference between the behavior here as compared to CTest's
interpretation of the `ENVIRONMENT_MODIFICATION` test property.
The `MYVAR=reset:` command when run in `cmake -E env` will reset `MYVAR`
to whatever its value was when `cmake -E env` launched, rather than try
to checkpoint after plain `MYVAR=VALUE` options.  This makes `MYVAR=VALUE`
and `--modify MYVAR=set:VALUE` semantically equivalent.
2022-08-17 12:54:39 -04:00
Alex Turbov
a6070b480f Help: Use placeholder instead of listing choices in option lines
This avoids any ambiguity with whether the choices are literal
values or not. It also makes the option lines more concise.
2022-08-14 09:58:41 +04:00
Alex Turbov
8ba20cb56f Help: Simplify cmake --log-level option definition 2022-08-14 09:58:41 +04:00
Alex Turbov
c401fc5dee Help: Simplify optional repeating option
Similar form has already been used in the `ctest -M <mode> [-T <step>]...`
synopsis and looks quite clean w/o extra characters.
2022-08-14 09:58:41 +04:00
Alex Turbov
28ecfd1690 Help: Short options first, then long, then Windows style 2022-08-14 09:58:41 +04:00
Alex Turbov
57f23fa8fc Help: {<…> | <…>}<…|…>
The form of alternative names for "placeholders" has been used already
(e.g., `<file|dir>` in the `cmake(1)` manual).
2022-08-14 09:58:41 +04:00