Commit Graph

8144 Commits

Author SHA1 Message Date
Brad King
b4bac3018f Help: Drop target_link_libraries mention of CMP0003 and CMP0004
These policies have been removed by CMake 4.0 and have not been
practically relevant in many years.

Issue: #26679
2025-02-11 09:24:07 -05:00
Brad King
639eee1a0c Help: Call out target_link_libraries legacy signatures earlier 2025-02-11 09:23:06 -05:00
Brad King
b2674f3b38 Merge topic 'instrumentation-doc-fixes' into release-4.0
32e9d27c88 instrumentation: Remove undocumented binaryDir field from snippets
d88458b5ea instrumentation: Improve documentation for CMake Instrumentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10320
2025-02-11 07:46:46 -05:00
Brad King
2baab9b99f Merge topic 'print-presets-log-level' into release-4.0
5303ad3823 Presets: Only print presets variables for verbose log level or higher

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10315
2025-02-11 07:45:21 -05:00
Brad King
120e26b828 Merge topic 'doc-execute_process-CMP0176-version' into release-4.0
5a2c0407b8 Help: Clarify when execute_process ENCODING UTF-8 became the default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10316
2025-02-10 19:02:40 -05:00
Martin Duffy
d88458b5ea instrumentation: Improve documentation for CMake Instrumentation 2025-02-10 16:57:45 -05:00
AJIOB
5a2c0407b8 Help: Clarify when execute_process ENCODING UTF-8 became the default
In commit e782811cfe (execute_process: Change default ENCODING to UTF-8,
2024-09-13, v3.31.0-rc1~94^2) we implied this by the version ranges in
the older defaults.  State it explicitly.
2025-02-10 16:18:16 -05:00
Brad King
640cf691fe Merge topic 'instrumentation-build-config' into release-4.0
9689155a05 instrumentation: Add Config value to snippet data
ee3a55fc48 cmMakefileGenerator: Update GetConfigName to return const reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10300
2025-02-10 08:24:59 -05:00
Craig Scott
5303ad3823
Presets: Only print presets variables for verbose log level or higher
Fixes: #26664
2025-02-10 22:56:55 +11:00
Martin Duffy
9689155a05 instrumentation: Add Config value to snippet data 2025-02-09 12:29:09 -05:00
Brad King
6f7341ed27 CPack/WIX: Replace documentation links with their permanent redirects 2025-02-08 09:39:02 -05:00
Aditya Vidyadhar Kamath
ff03db6657 AIX: Add platform id variables 'AIX' and 'CMAKE_HOST_AIX'
This allows projects to use `if(AIX)` blocks instead of spelling
out `if(CMAKE_SYSTEM_NAME STREQUAL "AIX")`.  We already have similar
variables for many other platforms.
2025-02-07 11:10:43 -05:00
Brad King
e74ff65385 Merge topic 'instrumentation-make-hooks' into release-4.0
314440c320 instrumentation: Run preBuild and postBuild hooks before and after make
6598248da7 instrumentation: Avoid busy-wait on postBuild hook
f8339cb944 instrumentation: Enable tests on more Makefile generators
0fbb927bdd instrumentation: Disable preBuild and postBuild hooks on Windows
a13be1301f Tests/RunCMake/Instrumentation: Improve quoting and escaping in CMake code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10295
2025-02-07 08:32:04 -05:00
Martin Duffy
314440c320 instrumentation: Run preBuild and postBuild hooks before and after make
Updates the preBuild and postBuild instrumentation hooks to run before and
after make is invoked.
2025-02-06 09:49:09 -05:00
Martin Duffy
0fbb927bdd instrumentation: Disable preBuild and postBuild hooks on Windows
The implementation does not work on Windows.

Issue: #26668
2025-02-06 07:46:09 -05:00
Brad King
410513d7cf Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2025-02-05 11:41:08 -05:00
Brad King
5fdd917f8a Help: Update Sphinx versionadded directives for 4.0 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v3.31.0 --overwrite

Manually renumber `3.32` to `4.0` since the script is meant for
minor version increments.  Also filter out changes to documents
that were added for long-existing variables.
2025-02-05 09:17:06 -05:00
Brad King
fb69ed725e Help: Organize and revise 4.0 release notes
Add section headers similar to the 3.31release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.
2025-02-05 09:15:16 -05:00
Brad King
1191647a0e Help: Consolidate 4.0 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/4.0.rst`.
2025-02-05 09:11:41 -05:00
Brad King
7065e7a555 Merge topic 'instrumentation-build-hooks'
2680f30caf instrumentation: Allow multiple CALLBACK arguments
fc1d55f6a5 instrumentation: Add preBuild and postBuild hooks for ninja
f62a4ab2ee instrumentation: Refactor cmInstrumentation constructor and usage
c57d1752d4 cmUVProcessChain: Add Detached option for spawning daemons

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10230
2025-02-05 09:08:33 -05:00
Brad King
0a17f39596 Merge topic 'cpack-archive-name'
7c825fd15f cpack: Respect CPACK_ARCHIVE_FILE_NAME for non-component packages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !10287
2025-02-05 09:06:47 -05:00
Martin Duffy
2680f30caf instrumentation: Allow multiple CALLBACK arguments
Don't require quotes around CALLBACK argument and allow it to be passed
multiple times.
2025-02-04 11:15:20 -05:00
Martin Duffy
fc1d55f6a5 instrumentation: Add preBuild and postBuild hooks for ninja
Allows instrumentation indexing and callbacks to occur at the start or end of
every `ninja` invocation.
2025-02-04 11:15:11 -05:00
Nikita Nemkin
7c825fd15f cpack: Respect CPACK_ARCHIVE_FILE_NAME for non-component packages
The variable CPACK_ARCHIVE_FILE_NAME (added in 9e06e97d30)
only works if per-component packaging is enabled. This isn't obvious
from the documentation.

Make it also work for non-component packages and adjust documentation.

Fixes: #8769
2025-02-04 20:36:10 +05:00
Brad King
8dfb1f40b7 Merge topic 'execute_process-cmd-bat'
74c9d40876 execute_process: Fix invocation of .cmd/.bat with spaces
104ca10208 cmWorkerPool: Adopt MaybePrependCmdExe calls to reduce duplication
cf7ba6d43d cmWorkerPool: Convert RunCommand signature to move semantics
c091fd1420 cmUVProcessChain: Convert AddCommand signature to move semantics
c1f6b04176 cmSystemTools: Teach MaybePrependCmdExe to always use backslashes
817b3967f8 cmSystemTools: Teach MaybePrependCmdExe to return GetShortPathNameW failure
611a3000f7 cmSystemTools: Make MaybePrependCmdExe case-insensitive
98fed0f116 cmSystemTools: Adopt MaybePrependCmdExe

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10270
2025-02-04 09:02:48 -05:00
Brad King
796db3a229 Merge topic 'ExternalData-add-httpheader'
5106f34eed ExternalData: Add option to specify HTTP headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10275
2025-02-04 08:59:42 -05:00
Brad King
76d874386a Merge topic 'fix-rst-code'
8d8fd9de2c Help: Fix typos in RST found by the `rst-backticks` hook

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10277
2025-02-03 13:21:56 -05:00
Jakob Ronestjärna
5106f34eed ExternalData: Add option to specify HTTP headers
Add a `ExternalData_HTTPHEADERS` variable to specify them.

Fixes: #26638
2025-02-03 11:30:59 -05:00
Brad King
0c5898558e Merge topic 'find-cps-components'
894f256a12 find_package: Find CPS components
ac20cd43c0 find_package: Fix reporting of transitive dependency errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10262
2025-02-03 10:07:25 -05:00
Brad King
74c9d40876 execute_process: Fix invocation of .cmd/.bat with spaces
The `CreateProcessW` documentation states "to run a batch file, you must
start the command interpreter".  Use `cmd /c the.bat` to run batch files.
Also, use a "short path" to the `.bat` file if needed to avoid spaces.

Previously this worked in some cases only due to undocumented behavior
of `CreateProcessW` when given a `.bat` file.

Fixes: #26655
2025-02-03 09:13:26 -05:00
Alex Turbov
8d8fd9de2c
Help: Fix typos in RST found by the rst-backticks hook 2025-02-02 18:56:26 +04:00
Brad King
d65f522a50 Merge topic 'FindRuby-compat-vars'
2d86cf314f FindRuby: Drop upper-case RUBY_ results in favor of Ruby_ variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10273
2025-02-02 07:03:10 -05:00
Brad King
4a11fd8dde Merge topic 'help-formatting'
d1d134534d Help: Add formatting to FindGettext and FindGnuplot
d138555959 Help: Use Title Case for all "Imported Targets" sections
bbbf3536c9 Help: Make sure all deprecated utility modules have a notice
969b039f40 Help: Reference correct variables in 3.6 release notes
9c963de998 Help: Remove stray spaces and one colon
51e4d81f16 Help: Remove accidental blockquotes around lists
718043b540 Help: Convert some literal blocks into tables and lists
914d580a4f Utilities/Sphinx: Ignore warning in generated texinfo documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10269
2025-02-01 07:19:04 -05:00
Brad King
2d86cf314f FindRuby: Drop upper-case RUBY_ results in favor of Ruby_ variables
Add policy CMP0185 for compatibility.

Fixes: #26640
2025-02-01 07:12:30 -05:00
Matthew Woehlke
894f256a12 find_package: Find CPS components
Implement finding components of CPS packages. Specifically, reject any
candidate packages that don't provide all required components, and
ignore appendices that don't provide requested (required or optional)
components. This applies to both top-level searches and also searching
for package dependencies.
2025-02-01 06:44:43 -05:00
Nikita Nemkin
bbbf3536c9 Help: Make sure all deprecated utility modules have a notice 2025-01-31 12:23:29 -05:00
Nikita Nemkin
969b039f40 Help: Reference correct variables in 3.6 release notes 2025-01-31 12:23:29 -05:00
Nikita Nemkin
9c963de998 Help: Remove stray spaces and one colon 2025-01-31 12:23:29 -05:00
Nikita Nemkin
51e4d81f16 Help: Remove accidental blockquotes around lists
Indenting a list relative to the previous paragraph creates
a blockquote. Combined with the natural list indent it results
in an overly large left margin.
2025-01-31 12:23:29 -05:00
Nikita Nemkin
718043b540 Help: Convert some literal blocks into tables and lists
Also, ensure that header-less tables have a top border in cmake.css.
2025-01-31 12:23:29 -05:00
Johnny Jazeix
09d5a4d7f0 CPack: add uncompressed TAR support
Fixes: #26646
2025-01-31 10:11:32 -05:00
Brad King
9d4be239b2 Help: Improve CPack Archive generator format list layout 2025-01-31 10:09:56 -05:00
Brad King
3e64c6a56e Merge topic 'msvc-runtime-checks'
2b2344b412 MSVC: Add abstraction for runtime checks
49dcd1ce5d Help: Fix MSVC_DEBUG_INFORMATION_FORMAT description of example
2f8e643d9d CMP0141: Fix documentation copied from CMP0091

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !10214
2025-01-30 08:48:01 -05:00
Brad King
0870e6c06b Merge topic 'enum_set-enhancements'
35dafcb5a1 cmext/enum_set: add various enhancements to increase usability
a3ae58c9c5 C++ features: add cm::is_scoped_enum from C++23

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10248
2025-01-30 08:44:35 -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
Nikita Nemkin
9890cfc4ec Help: More syntax highlighting for literal blocks
Covers almost all blocks containing actual code, except:

* Parsed-literal blocks can't be highlighted, including many command
  summaries and substitution-heavy docs like find_... commands.
  This is a Sphinx limitation.

* Code with errors, like CMP0049, DEPLOYMENT_ADDITIONAL_FILES,
  DEPLOYMENT_REMOTE_DIRECTORY, @PACKAGE_INIT@ substitution in the
  tutorial, bracket arguments/comments in cmake-language.7 and
  cmake-developer.7.

* FindQt4 module, which needs reformatting.
2025-01-29 16:48:53 -05:00
AJIOB
2b2344b412 MSVC: Add abstraction for runtime checks
Replace our hard-coded default for `/RTC1` with a first-class
abstraction to select runtime checks from an enumeration of logical
names.  Add a `MSVC_RUNTIME_CHECKS` target property and corresponding
`CMAKE_MSVC_RUNTIME_CHECKS` variable.

Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose
runtime checks under the old behavior.  Add policy CMP0184 to
provide compatibility.

Fixes: #26614
2025-01-29 13:07:41 -05:00
Brad King
ec7cc80370 Merge topic 'patch-lower-case-style'
4e6a13f211 Use lower case style for commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !10245
2025-01-29 11:37:51 -05:00
Brad King
e509c0a423 Merge topic 'patch-else'
9f2efc3270 Remove optional arguments from else() and end*() commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !10243
2025-01-29 11:35:30 -05:00
Brad King
fbb69f867c Merge topic 'FindCURL-version-var'
d039da1c24 FindCURL: Add CURL_VERSION variable to match upstream cmake package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10250
2025-01-29 11:32:39 -05:00