Commit Graph

8895 Commits

Author SHA1 Message Date
Peter Kokot
35b1250b0a GNUInstallDirs: Add notice about --prefix option
When setting the installation prefix at the installation phase
(`cmake --install`) using the `--prefix` option, the GNU special cases
aren't applicable. This also adds a small clarification when to use the
`--prefix` option at the installation phase.

Briefly mentioned also the CMake presets installDir field,
the CPACK_PACKAGING_INSTALL_PREFIX variable, and the $<INSTALL_PREFIX>
generator expression so user has a better overview.

Fixes #27343
Fixes #26338
2025-11-10 22:44:12 +01:00
Clinton Stimpson
5a18728cec CPack/Archive: Add support for setting UID/GID in archive
Add `CPACK_ARCHIVE_UID` and `CPACK_ARCHIVE_GID` options.

Add a policy to change the default to 0/0 to enable ownership
by root if unpacking as root.

Fixes: #12901
2025-11-08 09:25:08 -05:00
Brad King
7136da86cb Help: Add release note for policy CMP0205
This was missed in commit a73ddd2ddb (file(CREATE_LINK): Implement
COPY_ON_ERROR for directories, 2025-10-15).
2025-11-05 16:05:04 -05:00
Brad King
303ffae24f Merge topic 'deprecate-CMAKE_ENABLE_EXPORTS'
33d9146472 CMAKE_ENABLE_EXPORTS: Deprecate variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11381
2025-11-05 10:25:26 -05:00
Brad King
7bcdf7353a Merge topic 'ci-macos-qt-6.9.3'
3f21bf9f0a ci: Restore packaging with macOS SDK from Xcode
c1ee4d57dc Utilities/Release: Remove unused Qt 5.15.2 build script for macOS
0f18aa010e ci: Update to Qt 6.9.3 on macOS
2ae318bb5d cmake-gui: Install only necessary plugins for Qt 6
74dec2c7fd cmake-gui: Detect Qt lib directory on macOS more robustly
0d1321770d cmake-gui: Clarify signature of QCheckBox::checkStateChanged callbacks
a49e5c8eb9 Utilities/Release: Teach macOS notarization script to sign Qt artifacts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11386
2025-11-05 10:22:20 -05:00
Peter Kokot
33d9146472 CMAKE_ENABLE_EXPORTS: Deprecate variable
This makes it more clear which variable should be used.

Fixes #27357
2025-11-04 20:07:39 +01:00
Brad King
0f18aa010e ci: Update to Qt 6.9.3 on macOS
Get Qt updates fix `cmake-gui` button rendering when compiled with a
macOS 26 SDK.

Issue: #27325
2025-11-04 09:58:38 -05:00
Hanna Rusakovich
a73ddd2ddb file(CREATE_LINK): Implement COPY_ON_ERROR for directories
Add policy `CMP0205` for compatibility with projects not expecting this.

Fixes: #27294
2025-10-31 08:42:59 +03:00
Brad King
a53b052c6c Merge topic 'tutorial-step-0'
fb58de1a56 Tutorial: Add Step 0 to prepare the working environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11367
2025-10-30 08:51:15 -04:00
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
c11aa43ab8 Merge topic 'doc-cmake.org-tutorial-archive'
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:13 -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
5f889a093c Merge topic 'instrumentation-exit'
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:52 -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
5ae9d92a92 Merge topic 'project-license-doc'
ebf0a359ad Help: Improve documentation of project SPDX_LICENSE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11348
2025-10-28 09:32:40 -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
8986b8b7ae Merge topic 'xcode-macos-deployment-target'
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:18 -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
3267e4d0c9 Merge topic 'doc-3.31.9-typo'
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:19 -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
41a5e3b395 Merge topic 'instrumentation-show-only'
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:08 -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
df83179047 Merge topic 'sbom_model'
0653620033 cmSbom: Add SPDX object model and serializers
985b0f5bcf CMake C++11 Compatibility: Add more type_traits from C++14 and C++17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11231
2025-10-25 09:13:43 -04:00
Brad King
80cd036ceb Merge topic 'instrumentation-fix-link'
2678028eab Help/instrumentation: Fix link to CMake Content File

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11346
2025-10-24 17:13:22 -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
Brad King
f96cb60ba3 Merge topic 'fix-project-license-doc'
6500ea2776 Help: Add missing gate for project(SPDX_LICENSE)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11342
2025-10-24 17:02:26 -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
Brad King
b79c1a9f1a Merge topic 'Help-OPTIMIZE_DEPENDENCIES-fixes'
02805028bd HELP/OPTIMIZE_DEPENDENCIES: fix reST markup
c40f3b984b Help/OPTIMIZE_DEPENDENCIES: fix parity of which files are considered

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !11336
2025-10-22 16:37:16 -04:00
Taylor Sasser
985b0f5bcf CMake C++11 Compatibility: Add more type_traits from C++14 and C++17 2025-10-22 13:01:12 -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
cadbf8fe40 Merge topic 'patch-remove-definitions'
6374f70915 remove_definitions: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vito Gamberini <vito.gamberini@kitware.com>
Merge-request: !11328
2025-10-22 07:34:33 -04:00
Peter Kokot
6374f70915 remove_definitions: Update documentation
- Reworded command description.
- Briefly mentioned that this command can also remove other flags given
  by add_definitions().
- Added examples section.
- Mentioned also add_compile_definitions() command, as
  remove_definitions() can remove also those.
2025-10-21 22:23:15 +02:00
Brad King
760e58a6cb Merge topic 'doc-CMP0199-relnote'
b685d160cd Help: Clarify 4.2 release note on `$<CONFIG>` policy CMP0199

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11331
2025-10-20 16:36:09 -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
Brad King
6dfe90c0b2 Merge topic 'fbuild_ide_args'
31b51340a1 FASTbuild: allow setting custom IDE args

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11319
2025-10-20 13:46:08 -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
Brad King
a3267f6c6b Merge topic 'tutorial-fix-ipo'
058511c6b6 Tutorial: Update IPO example in Step 6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11316
2025-10-17 10:10:23 -04:00