Commit Graph

2825 Commits

Author SHA1 Message Date
AJIOB
94ae247d44 cli tar: support different algorithms for zip & 7z
Fixes: #27443
2025-12-11 12:00:31 -05:00
Matthew Woehlke
2151e5f79d export, install: Improve argument parsing
Modify the `export(EXPORT)` and `install(PACKAGE_INFO)` commands to
actually enforce that certain arguments must be non-empty. With respect
to `export`, this is mainly targeted at CPS export, but ends up
affecting all flavors of `export(EXPORT)` because that is the level at
which argument parsing is performed.

Also, add unit tests to verify that the new rejection of arguments with
missing or empty values is working, update the existing tests due to
changes in error reporting, and remove no-longer-needed manual
validation of an empty `PACKAGE_INFO` argument.
2025-12-09 13:37:01 -05:00
Brad King
ad7afb6455 Merge topic 'fix-27422'
d4d2a6a19d cli tar: support compression level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11479
2025-12-08 10:19:55 -05:00
Craig Scott
c0eb0ad5ef Merge topic 'instrumentation-post-workflow'
956d36d3cd instrumentation: Add postCMakeWorkflow hook

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Overchenko <aleksandr9809@gmail.com>
Merge-request: !11450
2025-12-07 19:27:41 -05:00
AJIOB
d4d2a6a19d cli tar: support compression level
Fixes #27422
2025-12-05 20:00:24 +03:00
Brad King
9149ac3f37 Merge topic 'fix-27420'
4fdfa0db1a file(ARCHIVE_CREATE): support multithreading compression
cbf71b21b2 cli tar: support multithreading compression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11460
2025-12-05 09:04:58 -05:00
Brad King
e4737d1c4a Merge topic 'cli-tar-lzma'
5b87a5d53e cli tar: implement LZMA support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11465
2025-12-03 16:26:20 -05:00
Martin Duffy
956d36d3cd instrumentation: Add postCMakeWorkflow hook
Issue: #27414
2025-12-03 16:00:37 -05:00
AJIOB
cbf71b21b2 cli tar: support multithreading compression
Fixes: #27420
2025-12-03 02:45:30 -05:00
Craig Scott
c98bec6ae6 Merge topic 'fileapi-compilerargs'
71a4e34d97 fileAPI: Expose CMAKE_<LANG>_COMPILER_ARG1
1e02926c9a fileAPI: Refactor toolchains schema to prepare for new version
3caa572c05 fileAPI: Output more info for test failures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11419
2025-12-02 16:27:43 -05:00
Brad King
8fd9ebea6b Merge topic 'doc-policy-max'
7323fbd65e Help: Be more explicit about what `...<policy_max>` does not mean

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11438
2025-12-02 15:52:30 -05:00
Brad King
95e8df9cab Merge topic 'fix-docs-27429'
cd5f7eb30a Help: improve XZ compression method docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11463
2025-12-02 15:37:22 -05:00
Christian Walther
71a4e34d97 fileAPI: Expose CMAKE_<LANG>_COMPILER_ARG1
Compiler arguments coming from CC environment variables or multi-element
CMAKE_<LANG>_COMPILER variables set by toolchain files were previously not
exposed in the file API. Among other possible problems, this caused clients
to determine wrong system include paths and built-in preprocessor macros by
calling the compiler without these important arguments.

This is fixed by adding an optional "commandFragment" attribute to the
compiler description in the `toolchains` object, containing these arguments
as a command line fragment. This is already the form in which they are
internally stored in the CMAKE_<LANG>_COMPILER_ARG1 variable, so all that is
required is adding this variable to the set of exported variables, besides
some logic to omit it if empty.

Issue: #22568
2025-12-03 07:34:53 +11:00
ferdymercury
7323fbd65e Help: Be more explicit about what ...<policy_max> does not mean
Also use `<policy_max>` more consistently in signatures.
2025-12-02 15:25:47 -05:00
AJIOB
5b87a5d53e cli tar: implement LZMA support
Fixes: #27433
2025-12-02 10:44:49 +03:00
Brad King
b8316b51f9 Merge topic 'doc-qnx'
50b53d1952 Help: Fix QNX cross-compile example toolchain file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11456
2025-12-01 12:33:18 -05:00
Christian Walther
1e02926c9a fileAPI: Refactor toolchains schema to prepare for new version
Co-authored-by: Craig Scott <craig.scott@crascit.com>
2025-12-01 12:27:57 +01:00
AJIOB
cd5f7eb30a Help: improve XZ compression method docs
Relates: #27429
2025-12-01 08:42:32 +03:00
Ilia Motornyi
50b53d1952 Help: Fix QNX cross-compile example toolchain file
`q++` is the correct name for C++ compiler.

QNX does not support ARM32 anymore.  Use `aarch64` instead.
2025-11-26 11:50:04 -05:00
Brad King
978ef6fee7 Merge topic 'renesas_compiler_toolchain_doc'
6139bb7903 Help: Document Renesas compiler toolchain

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11446
2025-11-26 10:47:31 -05:00
Hirofumi Nakamura
6139bb7903 Help: Document Renesas compiler toolchain
Extend commit 514135f563 (Renesas: Add support for Renesas compilers,
2025-04-14, v4.1.0-rc1~89^2) with more documentation.

Closes: #27395
2025-11-25 13:55:10 -05:00
Brad King
fdc1de26c9 Merge topic 'build-dir-override-presets'
19296f507d cmake --build: Allow CLI build dir to override presets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11425
2025-11-21 09:52:11 -05:00
William Allen
19296f507d cmake --build: Allow CLI build dir to override presets
`cmake --build <dir>` and `cmake --build --preset <preset>` are currently
mutually exclusive options.  This commit allows `<dir>` to override the
build directory specified in a preset.  This change allows the requirement
for each build preset to have a configure preset to be dropped in a future
commit.

Closes: #27384
2025-11-17 15:10:38 -05:00
FeRD (Frank Dana)
7f7175e0cd Help: Add target for policy deprecation link
In the policy pages' "deprecated by definition" box, instead of
linking that phrase to the `cmake-policies(7)` manual page, add
a label (`_cmake-policies-intro`) above the "Introduction" section,
and link to that label using the `:ref:` role instead.

This avoids landing the reader at the `cmake-policies(7)` table of
contents, which is now long enough that it's likely to fill their
entire screen unless they scroll down!

As an added bonus, using `:ref:` instead of `:manual:` avoids
applying monospace formatting to the link text.
2025-11-16 06:07:08 -05:00
Brad King
6087f56da9 Merge topic 'GenEx-STRING'
fd7e305097 GenEx: Add $<STRING> generator expression
7564cbae12 GenEx: add new expressions for string comparisons
dab5e6ebb1 introduce cm::CMakeString class as helper for string() command
34c0c7754f cmString: add methods append and insert
ab60f1a010 Extend usage for cm::string_view for more flexibility

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11382
2025-11-15 09:10:50 -05:00
Marc Chevrier
fd7e305097 GenEx: Add $<STRING> generator expression
Fixes: #27188
2025-11-14 16:44:29 +01:00
Marc Chevrier
7564cbae12 GenEx: add new expressions for string comparisons 2025-11-14 16:44:29 +01:00
hanna.rusakovich
bf3f69834d file(GET_RUNTIME_DEPENDENCIES): Normalize paths before matching
Regex-based filtering should not have to account for slash differences.
Add policy CMP0207 for compatibility.

Fixes: #26202
2025-11-14 17:23:26 +03:00
Brad King
22e4e7448f Merge topic 'genex'
5ae8584a50 Help: Add an example showing -I's value to be a separate argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11407
2025-11-13 08:20:55 -05:00
Brad King
515bb02443 Merge topic 'package-info-from-install-export'
34343922a5 install: Add ability to generate CPS from install(EXPORT)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11315
2025-11-12 11:53:07 -05:00
xndcn
5ae8584a50 Help: Add an example showing -I's value to be a separate argument 2025-11-12 10:15:26 +08:00
Matthew Woehlke
34343922a5 install: Add ability to generate CPS from install(EXPORT)
Add the ability to generate CPS package information when install(EXPORT)
is used. This relies on additional information to be passed to CMake,
and is intended as a way of getting CPS out of existing projects without
needing to make changes to the projects' CMakeLists.txt. (Particularly,
this feature is intended for package distributors, not project authors.)
2025-11-11 11:51:58 -05:00
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
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
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
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
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
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
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
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
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
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
bf086d337a Merge topic 'doc-cmake_path'
c575d84555 Help: Use signature directive for `cmake_path` command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11294
2025-10-10 10:24:26 -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
3cf002e2db Begin post-4.2 development 2025-10-09 10:27:29 -04:00