Commit Graph

8863 Commits

Author SHA1 Message Date
Vito Gamberini
fb58de1a56 Tutorial: Add Step 0 to prepare the working environment
Adds a "Step 0" to the tutorial which discusses minutia about where to
get CMake, how to run it, and most importantly deals at length with
various generator issues which aren't covered elsewhere.
2025-10-29 09:49:23 -04:00
Brad King
b22a77e337 Merge topic 'doc-cmake.org-tutorial-archive' into release-4.2
5473a45fd8 Tutorial: Restore source archive when published on cmake.org

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11370
2025-10-29 09:31:10 -04:00
Brad King
5473a45fd8 Tutorial: Restore source archive when published on cmake.org
Restore commit 4cb616fed6 (Tutorial: Provide a source archive when
published on cmake.org, 2022-04-27, v3.23.2~22^2).  Its effects were
accidentally reverted by commit 9784834b4c (Help: Use `*.rst` extension
for included files, 2025-04-07, v4.1.0-rc1~354^2).

Reported-by: Vito Gamberini <vito.gamberini@kitware.com>
2025-10-29 09:17:14 -04:00
Brad King
aef339b26f Merge topic 'instrumentation-exit' into release-4.2
236207b81a instrumentation: Fix snippet `result` field
d3add47973 Tests/Instrumentation: Remove unused files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11339
2025-10-28 09:38:49 -04:00
Brad King
b5ec664401 Merge topic 'project-license-doc' into release-4.2
ebf0a359ad Help: Improve documentation of project SPDX_LICENSE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11348
2025-10-28 09:32:37 -04:00
Tyler Yankee
236207b81a instrumentation: Fix snippet result field
Give the actual exit code of the command from the snippet as intended;
currently, this always gives 0 for sub-commands like compile and link,
as well as `ctest`.

For now, the result in build snippets will be `null`.
2025-10-27 15:42:58 -04:00
Matthew Woehlke
ebf0a359ad Help: Improve documentation of project SPDX_LICENSE
Currently, CMake allows specifying a license (`SPDX_LICENSE`) for both
projects and targets, which is largely motivated by CPS export. The
design of CPS is geared toward components (targets) only expressing an
explicit license when that component's license differs from the license
that applies to the package as a whole (or, at least, the license
generally used by the package's software components). Accordingly, the
project license is not used to initialize the `SPDX_LICENSE` target
property at export time. This, however, was not documented previously.

Add a note explaining this to the `SPDX_LICENSE` option of the `project`
command.

Fixes: #27295
2025-10-27 10:38:40 -04:00
Brad King
b39e361175 Merge topic 'xcode-macos-deployment-target' into release-4.2
de53a46a91 Help: Add 4.1 release note for restored Xcode default deployment target
85ba6f5d1b Merge branch 'backport-4.0-xcode-macos-deployment-target'
884260ced6 Help: Add 4.0 release note for restored Xcode default deployment target
1a37c83c7e Xcode: Restore default CMAKE_OSX_DEPLOYMENT_TARGET to run on host
e927408047 Apple: Initialize deployment target after SDK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11361
2025-10-27 09:26:15 -04:00
Brad King
db76228cb4 Merge topic 'doc-3.31.9-typo' into release-4.2
d07cedf9b3 Help: Fix typo in 3.31.9 release note heading

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11362
2025-10-27 09:23:17 -04:00
Brad King
4e2aeae7ba Merge topic 'xcode-macos-deployment-target' into release-4.1
de53a46a91 Help: Add 4.1 release note for restored Xcode default deployment target
85ba6f5d1b Merge branch 'backport-4.0-xcode-macos-deployment-target'
884260ced6 Help: Add 4.0 release note for restored Xcode default deployment target
1a37c83c7e Xcode: Restore default CMAKE_OSX_DEPLOYMENT_TARGET to run on host
e927408047 Apple: Initialize deployment target after SDK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11361
2025-10-27 09:12:00 -04:00
Brad King
847ce737c2 Merge topic 'doc-3.31.9-typo' into release-4.1
d07cedf9b3 Help: Fix typo in 3.31.9 release note heading

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11362
2025-10-27 09:11:22 -04:00
Brad King
d07cedf9b3 Help: Fix typo in 3.31.9 release note heading 2025-10-26 14:06:25 -04:00
Brad King
de53a46a91 Help: Add 4.1 release note for restored Xcode default deployment target 2025-10-26 11:20:10 -04:00
Brad King
85ba6f5d1b Merge branch 'backport-4.0-xcode-macos-deployment-target' 2025-10-26 11:19:58 -04:00
Brad King
884260ced6 Help: Add 4.0 release note for restored Xcode default deployment target 2025-10-26 11:19:19 -04:00
Brad King
1a37c83c7e Xcode: Restore default CMAKE_OSX_DEPLOYMENT_TARGET to run on host
Xcode by default targets the SDK's macOS version rather than the host's
macOS version.  In commit 7b19531291 (macOS: Do not pass any
SDK/-isysroot to compilers by default, 2024-11-06, v4.0.0-rc1~511^2) we
reverted commit 24aafbde11 (Xcode: Adjust deployment target SDK version
to host version, 2015-10-11, v3.4.0-rc2~6^2), but it is still needed for
Xcode.  Restore the behavior so binaries run on the host by default.

Fixes: #27309
2025-10-26 11:19:19 -04:00
Brad King
0030253224 Merge topic 'instrumentation-show-only' into release-4.2
de3cb099a3 instrumentation: Add showOnly to ctest snippets
2976742520 instrumentation: Only quote arguments that contain a space

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !11337
2025-10-26 10:34:06 -04:00
Brad King
5a34759eeb Merge topic 'instrumentation-fix-link' into release-4.2
2678028eab Help/instrumentation: Fix link to CMake Content File

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11346
2025-10-24 17:13:20 -04:00
Martin Duffy
de3cb099a3 instrumentation: Add showOnly to ctest snippets
Fixes: #27269
2025-10-24 11:08:52 -04:00
Tyler Yankee
2678028eab Help/instrumentation: Fix link to CMake Content File
Fix typo from commit 97adbc91fa (instrumentation: Move target data into
content files, 2025-09-25, v4.2.0-rc1~49^2).
2025-10-23 15:30:09 -04:00
Matthew Woehlke
6500ea2776 Help: Add missing gate for project(SPDX_LICENSE)
The `SPDX_LICENSE` option of the `project` command requires that the
`CMAKE_EXPERIMENTAL_EXPORT_PACKAGE_INFO` gate is enabled, but this was
not documented. Add the missing documentation.

Fixes: #27328
2025-10-23 11:36:16 -04:00
Ben Boeckel
02805028bd HELP/OPTIMIZE_DEPENDENCIES: fix reST markup 2025-10-22 09:47:08 -04:00
Ben Boeckel
c40f3b984b Help/OPTIMIZE_DEPENDENCIES: fix parity of which files are considered 2025-10-22 09:46:40 -04:00
Brad King
b685d160cd Help: Clarify 4.2 release note on $<CONFIG> policy CMP0199
Clarify the release note added by commit 8ac826a5f2 (GenEx: Fix
evaluation of $<CONFIG> on imported targets, 2025-07-30,
v4.2.0-rc1~439^2) to more precisely describe the behavior change.

See: https://discourse.cmake.org/t/15251/2
2025-10-20 14:32:13 -04:00
Eduard Voronkin
31b51340a1 FASTbuild: allow setting custom IDE args
Allow users to set custom args
when FBuild is invoked via IDE.
2025-10-17 10:16:14 -04:00
Vito Gamberini
058511c6b6 Tutorial: Update IPO example in Step 6 2025-10-16 09:09:51 -04:00
Peter Kokot
c8ea0ba3be Find*: Add missing <PackageName>_FOUND variables
* FindKDE4: Added note about KDE4_FOUND result variable (it is set by
  the upstream FindKDE4Internal module, and now also synced in the docs
  and code for consistency).

For the sake of completeness with other find modules, also the following
deprecated find modules are synced as they already provided these
variables:

* FindDart: Documented the Dart_FOUND result variable.
* FindUnixCommands: Updated documentation (documented UnixCommands_FOUND
  result variable, and listed cache variables used by this module).

Issue: #27242
2025-10-13 12:06:58 -04:00
Brad King
7095118a78 Merge topic 'fix-copy-on-error-directory-info' into release-4.2
657e9be724 file(CREATE_LINK): Document `COPY_ON_ERROR` behavior on directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11299
2025-10-12 09:20:18 -04:00
Alex Overchenko
657e9be724 file(CREATE_LINK): Document COPY_ON_ERROR behavior on directories
Issue: #27294
2025-10-10 10:26:36 -04:00
Brad King
3f87b4d5d8 Merge topic 'doc-cmake_path' into release-4.2
c575d84555 Help: Use signature directive for `cmake_path` command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11294
2025-10-10 10:24:24 -04:00
Brad King
32d776ea0b Merge topic 'doc-ctest-env-whitespace' into release-4.2
597e421ba3 Help: Remove incorrect Windows env var limitation from CTEST_PARALLEL_LEVEL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11297
2025-10-10 10:21:44 -04:00
Brad King
706bf669e1 Merge topic 'doc-apple-arch-default' into release-4.2
6055a12d36 Help: Document default architecture when CMAKE_OSX_ARCHITECTURES is not set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: rumgot rumgotov <rumgot@gmail.com>
Merge-request: !11296
2025-10-10 10:19:10 -04:00
Brad King
79bc6f6b60 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-10-09 10:20:36 -04:00
Brad King
597e421ba3 Help: Remove incorrect Windows env var limitation from CTEST_PARALLEL_LEVEL
In commit 5de1e21659 (ctest: Allow passing -j without value to choose a
contextual default, 2024-03-06, v3.29.0-rc4~10^2) I misdiagnosed the
reason that the test could not set an empty environment variable on
Windows.  It is actually a limitation of `set(ENV{VAR})` inherited from
its implementation using `_wputenv`.  Process environment blocks can
contain empty environment variables.

Issue: #27285
2025-10-09 09:46:01 -04:00
Brad King
5e9722866a Help: Update Sphinx versionadded directives for 4.2 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v4.1.0 --overwrite
2025-10-09 09:38:20 -04:00
Brad King
5c7e90d954 Help: Organize and revise 4.2 release notes
Add section headers similar to the 4.1 release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.
2025-10-09 09:38:02 -04:00
Brad King
ec28123cb4 Help: Consolidate 4.2 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/4.2.rst`.
2025-10-09 09:36:44 -04:00
Brad King
6055a12d36 Help: Document default architecture when CMAKE_OSX_ARCHITECTURES is not set
Issue: #27293
2025-10-09 09:31:49 -04:00
Martin Duffy
f195c9ef2a genex: Add TARGET_INTERMEDIATE_DIR expression
Fixes: #27196
2025-10-09 08:07:20 -04:00
Tyler Yankee
c575d84555 Help: Use signature directive for cmake_path command
Using `signature` renders the anchor links for each sub-command, and is
consistent with the other `Help/command` pages which contain multiple
sub-commands.
2025-10-08 20:44:38 -04:00
Craig Scott
f38f325e08 fileAPI: Add direct dependencies to target codemodel files
This adds the following new arrays, which together capture all direct
dependencies and interface dependencies of a target:

- linkLibraries
- interfaceLinkLibraries
- compileDependencies
- interfaceCompileDependencies
- objectDependencies
- orderDependencies

Fixes: #21995, #25213
2025-10-07 10:44:28 -04:00
Brad King
0181fb4cc5 Merge topic 'define-msvc-charset'
b554dead95 Tests: Cover CMP0203 and CMP0204 on all platforms
6874efb592 MSVC: Always define a character set
2cae68ecbe Source: Minor optimizations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11269
2025-10-07 10:43:08 -04:00
AJIOB
6874efb592 MSVC: Always define a character set
When targeting the MSVC ABI, define `_MBCS` by default if the project
does not define `_SBCS` or `_UNICODE`.  Visual Studio has long defined
one of the three character set macros automatically.  For consistency,
define it when compiling for the MSVC ABI with other generators.
Add policy CMP0204 for compatibility.

Fixes: #27275
2025-10-07 09:29:32 -04:00
Brad King
927ccf212f Merge topic 'help-TRYRUN_OUTPUT_STDOUT'
6d61783103 Help: Document try_run output cache entries for cross-build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11284
2025-10-07 09:02:32 -04:00
Brad King
9126ed5162 Merge topic 'fix_dev_docs_typo'
2b5fcf1d07 Help/dev: Fix typo in Source Code Guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11282
2025-10-06 10:40:08 -04:00
Jinzhe Zeng
6d61783103 Help: Document try_run output cache entries for cross-build
Document `try_run` cache entries added by commit a2cd0687db (try_run:
Add RUN_OUTPUT_STDOUT_VARIABLE and RUN_OUTPUT_STDERR_VARIABLE.,
2022-07-08, v3.25.0-rc1~443^2):

* `<runResultVar>__TRYRUN_OUTPUT_STDOUT`
* `<runResultVar>__TRYRUN_OUTPUT_STDERR`

Fixes: #27281
2025-10-06 10:33:54 -04:00
Alex Overchenko
2b5fcf1d07 Help/dev: Fix typo in Source Code Guide 2025-10-06 10:20:03 -04:00
Vito Gamberini
c8adfdb0a8 Tutorial: Fix typos and mislabeled code blocks 2025-10-03 18:01:06 -04:00
Brad King
0d01bc72b8 Merge topic 'cps-symbolic-info'
62a1d3e7f1 FileAPI: Add symbolic property to targets
d92b6c3e20 CPS: Add Symbolic Components
03284e018f Help: Simplify file-api version information for "abstract" field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11132
2025-10-03 11:24:50 -04:00
Brad King
caf01b88bc Merge topic 'instrumentation-target-content'
97adbc91fa instrumentation: Move target data into content files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11251
2025-10-03 11:21:17 -04:00