Commit Graph

38443 Commits

Author SHA1 Message Date
Marc Chevrier 34c0c7754f cmString: add methods append and insert 2025-11-14 16:44:29 +01:00
Marc Chevrier ab60f1a010 Extend usage for cm::string_view for more flexibility 2025-11-14 16:44:29 +01:00
Brad King 3566a30938 Merge topic 'vs-slnx'
7c284f4278 VS: Fix SLNX with multiple solution-to-project configuration mappings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11415
2025-11-14 09:46:33 -05:00
Brad King a799c49454 Merge topic 'clang-analyzer'
742c70a5da autogen: Remove unnecessary nullptr check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11414
2025-11-14 09:40:58 -05:00
Kitware Robot a424a6987f CMake Nightly Date Stamp 2025-11-14 00:06:12 -05:00
Brad King 7c284f4278 VS: Fix SLNX with multiple solution-to-project configuration mappings
Filter each mapping to apply only to its intended solution-wide config.

Fixes: #27385
2025-11-13 12:01:51 -05:00
Brad King 742c70a5da autogen: Remove unnecessary nullptr check
In commit b1b3602cda (FASTBuild: remove non-existent autogen byproducts,
2025-11-10) we added an unnecessary nullptr check on a pointer we know
to be non-nullptr.  Since then, `clang-analyzer` takes that check as a
hint that the pointer might be nullptr, and has reported missing nullptr
checks elsewhere.
2025-11-13 09:46:18 -05:00
Brad King 733a92c943 Merge topic 'ci-debian-13'
322bf67a86 Merge branch 'backport-ci-debian-13' into ci-debian-13
8832f78dd6 IWYU: Update for Debian 13 CI job
f49b0e6759 IWYU: Update for Debian 13 CI job
3653b3e95e Merge branch 'backport-ci-debian-13' into ci-debian-13
1445a8e7db ci: use Debian 13 images and environments
9eedf6c1a9 ci: Update base images to Debian 13
36bdb7b2de ci: Update to TIClang 4.0.4
48f091a166 ci: Update debian12-ninja job to use Swift 6.2.1
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11412
2025-11-13 08:16:15 -05:00
Brad King 02bf95acfe Merge topic 'cmake-gui-reset-model'
327f50083b cmake-gui: Fix {begin|end}ResetModel warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11406
2025-11-13 08:11:48 -05:00
Joerg Bornemann 327f50083b cmake-gui: Fix {begin|end}ResetModel warnings
QStandardItemModel::beginResetModel() and
QStandardItemModel::endResetModel() calls cannot be nested, and Qt will
produce warnings at runtime if such nesting is detected.

The nesting happened in two places:
1. QCMakeCacheModel::setViewType calls QCMakeCacheModel::setProperties.
Both called beginResetModel.
2. QCMakeCacheModel::setProperties calls QStandardItemModel::clear(),
which also calls beginResetModel.

The fix for 1 is to remove the {begin|end}ResetModel calls from
setViewType. The setProperties calls take care of the
{begin|end}ResetModel calls.

The fix for 2 is to replace the clear() call with a call that removes
all data rows.

Issue: #27376
2025-11-13 08:08:15 -05:00
Kitware Robot f276541247 CMake Nightly Date Stamp 2025-11-13 00:08:25 -05:00
Brad King 8832f78dd6 IWYU: Update for Debian 13 CI job
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library.  Update includes
to satisfy IWYU for our CI job under Debian 13.  Some patterns:

* Types named in virtual `override` signatures no longer require
  includes since the overridden signature already names them.

* A function argument's type needs to be included even if its constructor
  is called only by implicit conversion.  For example, constructing a
  `std::function` from a lambda now requires `<functional>`.

* Some prior mysterious `<type_traits>` inclusions are no longer required.
2025-11-12 14:54:35 -05:00
Brad King f49b0e6759 IWYU: Update for Debian 13 CI job
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library.  Update includes
to satisfy IWYU for our CI job under Debian 13.  Some patterns:

* Types named in virtual `override` signatures no longer require
  includes since the overridden signature already names them.

* A function argument's type needs to be included even if its constructor
  is called only by implicit conversion.  For example, constructing a
  `std::function` from a lambda now requires `<functional>`.

* Some prior mysterious `<type_traits>` inclusions are no longer required.
2025-11-12 14:54:16 -05:00
Brad King 3653b3e95e Merge branch 'backport-ci-debian-13' into ci-debian-13 2025-11-12 14:44:43 -05:00
Brad King a0059a2771 cmDocumentationFormatter: Implement PrintFormatted privately 2025-11-12 14:35:10 -05:00
Brad King 02f3f5d801 Merge topic 'cmake-E-copy-system-errors'
fb7a904e90 cmcmd: report system errors on more filesystem operations
4795cb6550 Merge branch 'upstream-KWSys' into cmake-E-copy-system-errors
dc8cc945ee KWSys 2025-11-12 (1139f8a0)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11401
2025-11-12 11:59:48 -05:00
Frank Winklmeier fb7a904e90 cmcmd: report system errors on more filesystem operations
Print the system error message in case of failure when calling
`CopyFileAlways`, `CopyFileIfDifferent`, `CopyFileIfNewer`,
`CopyADirectory` and `MakeDirectory`.

Remove unnecessary `cmSystemTools` wrappers for `CopyFileIfNewer` and
`CopyADirectory`.

Fixes: #18276
2025-11-12 11:53:35 -05:00
Brad King 4795cb6550 Merge branch 'upstream-KWSys' into cmake-E-copy-system-errors
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2025-11-12 (1139f8a0)
2025-11-12 11:53:21 -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
Brad King 4c1ace5fba Merge topic 'fbuild_byproducts'
b1b3602cda FASTBuild: remove non-existent autogen byproducts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11405
2025-11-12 11:47:16 -05:00
Brad King 203a1cb1c5 Merge topic 'fbuild_byproducts' into release-4.2
b1b3602cda FASTBuild: remove non-existent autogen byproducts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11405
2025-11-12 11:47:14 -05:00
Brad King 31c38f722a Merge topic 'fbuild_unique_names'
d6bc1a8a50 FASTBuild: rename test target to RUN_TESTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11403
2025-11-12 11:42:13 -05:00
Brad King 3c276579e2 Merge topic 'fbuild_unique_names' into release-4.2
d6bc1a8a50 FASTBuild: rename test target to RUN_TESTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11403
2025-11-12 11:42:11 -05:00
Brad King 3529a96ba5 Merge topic 'process-timeout-terminate'
3dc641d99c Merge branch 'backport-3.31-process-timeout-terminate'
22e84c7e7f execute_process: Restore termination of processes on timeout
e2cfc61e5e execute_process: Restore termination of processes on timeout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11408
2025-11-12 10:53:50 -05:00
Brad King db1b109e77 Merge topic 'process-timeout-terminate' into release-4.2
3dc641d99c Merge branch 'backport-3.31-process-timeout-terminate'
22e84c7e7f execute_process: Restore termination of processes on timeout
e2cfc61e5e execute_process: Restore termination of processes on timeout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11408
2025-11-12 10:53:47 -05:00
Kitware Robot 3454109c42 CMake Nightly Date Stamp 2025-11-12 00:06:38 -05: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
Brad King 22e84c7e7f execute_process: Restore termination of processes on timeout
Since commit 5420639a8d (cmExecuteProcessCommand: Replace cmsysProcess
with cmUVProcessChain, 2023-06-01, v3.28.0-rc1~138^2~8) we have not
actually terminated child processes on an `execute_process` timeout.
Similarly for other migrations from cmsysProcess to cmUVProcessChain.

Teach cmUVProcessChain clients that implement timeouts to actually
terminate remaining child processes when the timeout is reached.

Fixes: #27378
2025-11-11 09:10:29 -05:00
Eduard Voronkin b1b3602cda FASTBuild: remove non-existent autogen byproducts
Fixes: #27374
2025-11-11 08:59:44 -05:00
Eduard Voronkin d6bc1a8a50 FASTBuild: rename test target to RUN_TESTS
Avoid case-insensitive conflicts with project targets called `Test`.

Fixes: #27372
2025-11-11 08:54:54 -05:00
Brad King 174fca1854 Merge topic 'update-libarchive'
ffce9fa39c Utilities: Update hard-coded try_compile results for libarchive 3.8.2
3c91d4427d libarchive: Set build options the way we need for CMake
c0354ddf83 Merge branch 'upstream-LibArchive' into update-libarchive
73b8b633a7 LibArchive 2025-10-15 (7f53fce0)
93620e671b libarchive: Update script to get 3.8.2
5c1ec64d20 Merge branch 'test-libarchive-3.8.2' into update-libarchive
576117b7eb Tests: Update expected Zstandard magic number for libarchive 3.8.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11402
2025-11-11 08:23:26 -05:00
Kitware Robot 86e8bd3b4b CMake Nightly Date Stamp 2025-11-11 00:04:28 -05:00
Brad King 3c91d4427d libarchive: Set build options the way we need for CMake 2025-11-10 15:12:47 -05:00
Brad King 8b32e8c057 CMake 4.2.0-rc3 2025-11-10 09:55:31 -05:00
Brad King 6dcfe66085 Merge topic 'cpack-archive-ownership'
5a18728cec CPack/Archive: Add support for setting UID/GID in archive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11353
2025-11-10 09:15:13 -05:00
Brad King deb70f536e Merge topic 'cmake-init'
40b093649b cmake: Avoid calling GetCMakeListFile with empty directory
f6b3ba5f55 CMP0198: Maintain CMAKE_PARENT_LIST_FILE only when configuring projects
3593aa59ef cmake: Replace working mode with role
accfa7fa81 cmake: Infer command failure action from role
e290d4f2a3 cmake: Infer command set from role
bfaaec6179 cmake --workflow: Convert implementation to internal role
ea5d04975e cmake --build: Convert implementation to internal role
0b83750e14 cmake: Clarify name of role of internal instances
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11395
2025-11-10 09:13:42 -05:00
Brad King 06b3095df7 Merge topic 'process-timeout-short'
6ec2c51f0c execute_process: Restore support for short timeouts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11399
2025-11-10 09:08:41 -05:00
Brad King 5d69468679 Merge topic 'process-timeout-short' into release-4.2
6ec2c51f0c execute_process: Restore support for short timeouts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11399
2025-11-10 09:08:39 -05:00
Brad King 1ec4e64227 Merge topic 'process-timeout-short' into release-4.0
6ec2c51f0c execute_process: Restore support for short timeouts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11399
2025-11-10 09:06:55 -05:00
Kitware Robot c3ba7ecaa5 CMake Nightly Date Stamp 2025-11-10 00:09:46 -05:00
Brad King 6ec2c51f0c execute_process: Restore support for short timeouts
Since commit 5420639a8d (cmExecuteProcessCommand: Replace cmsysProcess
with cmUVProcessChain, 2023-06-01, v3.28.0-rc1~138^2~8) we've
occasionally observed immediate timeouts on processes that take longer
than the timeout to start, even though we only start the timer after the
child processes start.  The problem is that:

* `uv_loop_init` initializes `uv_loop_t`'s cached "now" time.
* Starting processes takes time but does not update the "now" time.
* `uv_timer_start` computes expiry relative the cached "now" time,
  so short timers may be expired as soon as they are started.
* `uv_run` invokes expired timer callbacks before polling for I/O
  or process completion, so we "timeout" immediately.

Fix this by updating the cached "now" time via `uv_update_time` just
before starting timers.  This is needed only for timers that start
before the `uv_run` event loop.  Update our `uv_timer_ptr` wrapper
to make all callers consider the choice when calling `start()`.
2025-11-09 09:13:43 -05:00
Kitware Robot 11b487d841 CMake Nightly Date Stamp 2025-11-09 00:07:11 -05: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
Kitware Robot d90e073cdd CMake Nightly Date Stamp 2025-11-08 00:06:41 -05:00
Brad King 40b093649b cmake: Avoid calling GetCMakeListFile with empty directory 2025-11-07 09:35:55 -05:00
Brad King f6b3ba5f55 CMP0198: Maintain CMAKE_PARENT_LIST_FILE only when configuring projects
Revise commit 41aea12941 (Do not define CMAKE_PARENT_LIST_FILE in
CMakeLists.txt, 2025-07-05, v4.2.0-rc1~505^2).
2025-11-07 09:35:55 -05:00
Brad King 3593aa59ef cmake: Replace working mode with role 2025-11-07 09:35:55 -05:00
Brad King accfa7fa81 cmake: Infer command failure action from role 2025-11-07 09:35:55 -05:00
Brad King e290d4f2a3 cmake: Infer command set from role 2025-11-07 09:35:54 -05:00
Brad King bfaaec6179 cmake --workflow: Convert implementation to internal role
Previously it initialized as `PROJECT` but didn't actually add any
commands.  This was likely copied from the `--build` implementation,
which has since been converted to `INTERNAL` too.
2025-11-07 09:35:54 -05:00