Commit Graph
72657 Commits
Author SHA1 Message Date
Brad King 8b32e8c057 CMake 4.2.0-rc3 v4.2.0-rc3 2025-11-10 09:55:31 -05:00
Brad King 86cf76a8d8 Merge topic 'update-curl' into release-4.2
fc5aed6035 curl: Restore support for custom CApath without a default
92dcb68826 curl: Set build options the way we need for CMake
8429b65f27 Merge branch 'upstream-curl' into update-curl
e28c33c159 curl 2025-11-05 (400fffa9)
87e10c1053 curl: Update script to get curl 8.17.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11394
2025-11-10 09:12:08 -05:00
Brad King d0d72cbde6 Merge branch 'release-4.1' into release-4.2 2025-11-10 09:09:47 -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 deb88d9fe1 Merge branch 'release-4.0' into release-4.1 2025-11-10 09:07:58 -05:00
Brad King d11dceee4f Merge topic 'process-timeout-short' into release-4.1
6ec2c51f0c execute_process: Restore support for short timeouts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11399
2025-11-10 09:07:39 -05:00
Brad King f1f39347c2 Merge branch 'release-3.31' into release-4.0 2025-11-10 09:07:22 -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
Brad King dd8c14e9e5 Merge topic 'process-timeout-short' into release-3.31
6ec2c51f0c execute_process: Restore support for short timeouts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11399
2025-11-10 09:00:43 -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
Brad King fc5aed6035 curl: Restore support for custom CApath without a default
Backport upstream curl commit `f55974c139` (vtls: fix CURLOPT_CAPATH
use, 2025-11-08).  It revises commit `eefd03c572` (ssl: support Apple
SecTrust configurations, 2025-09-24, `curl-8_17_0~443`) to accept
`CURLOPT_CAPATH` when there is no default `CURL_CA_PATH`.

CURL-Issue: https://github.com/curl/curl/issues/19401
CURL-PR: https://github.com/curl/curl/pull/19408
2025-11-09 08:50:16 -05:00
Brad King 7808d9e4ab Merge topic 'ci-fedora-43' into release-4.2
a61ef50ea6 ci: Update Fedora 43 base image to get bzr and flang fixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11393
2025-11-07 09:20:32 -05:00
Brad King c77f7b1d3f Merge topic 'gtest-discovery-race-condition' into release-4.2
72ce711899 GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11392
2025-11-07 09:18:15 -05:00
Brad King 92dcb68826 curl: Set build options the way we need for CMake
Set options added by the update to curl 8.17.0.
2025-11-06 17:06:37 -05:00
Brad King 8429b65f27 Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2025-11-05 (400fffa9)
2025-11-06 16:51:58 -05:00
Curl Upstream e28c33c159 curl 2025-11-05 (400fffa9)
Code extracted from:

    https://github.com/curl/curl.git

at commit 400fffa90f30c7a2dc762fa33009d24851bd2016 (curl-8_17_0).
2025-11-06 16:50:08 -05:00
Brad King 87e10c1053 curl: Update script to get curl 8.17.0 2025-11-06 16:49:50 -05:00
Brad King a61ef50ea6 ci: Update Fedora 43 base image to get bzr and flang fixes
* breezy: https://bugzilla.redhat.com/show_bug.cgi?id=2366194
* flang: https://bugzilla.redhat.com/show_bug.cgi?id=2401176
2025-11-06 15:46:52 -05:00
Brad King 72ce711899 GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()
Fix commit 6680df042e (GoogleTest: Avoid POST_BUILD race condition for
gtest_discover_tests(), 2025-10-26, v4.2.0-rc2~15^2) to actually hash
the target name instead of an empty string.

Fixes: #27319
2025-11-06 14:28:30 -05:00
Brad King 38095c2da5 Merge topic 'fix-cps-crash-on-bad-input' into release-4.2
fa4bed7844 cmPackageInfoReader: Don't crash if input is malformed
be99a82eee cmPackageInfoReader: Just use std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11390
2025-11-06 13:26:10 -05:00
Brad King 6b03947c2c Merge topic 'improve-cps-find_package-failure-reporting' into release-4.2
6c2fc502b6 find_package: Report why a candidate was rejected

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11377
2025-11-06 13:24:36 -05:00
Matthew Woehlke fa4bed7844 cmPackageInfoReader: Don't crash if input is malformed
Check all instances of converting a JSON value to a string to ensure
that we check first if the value is convertible, in order to avoid an
exception being thrown, which crashes CMake. Modify some instances to
report when we encounter such invalid values. (Many instances, however,
just silently ignore invalid values.)

Fixes: #27350
2025-11-05 11:29:13 -05:00
Matthew Woehlke be99a82eee cmPackageInfoReader: Just use std::string
Change cmPackageInfoReader::SetMetaProperty to just take the property
name as a std::string. We end up constructing one when we call
cmTarget::SetProperty, so we might as well do it up front and be done
with it. (Before, we were converting a string_view to char*, which is
decidedly non-optimal.)
2025-11-05 10:46:09 -05:00
Matthew Woehlke 6c2fc502b6 find_package: Report why a candidate was rejected
Improve how find_package reports the list of candidate package
configuration files that were considered but rejected to include a
reason for rejection. For CPS in particular, this allows the user to
tell if a CPS file was rejected due to a version mismatch, missing
required components, or because the file could not be read.

While we do not try to report more detail for why cmPackageInfoReader
rejected a file, the possible reasons are usually easy enough to
distinguish:

- The file is so malformed that we cannot read a JSON object.
- The schema version is not a version that CMake understands.
- The root object does not contain a string named "name".
- The root object does not contain an object named "components".
- Prefix resolution failed.

Three of these can only result from a file that fails schema validation.
2025-11-05 10:45:23 -05:00
Brad King 6ece8dee79 Merge topic 'improve-codespell' into release-4.2
7cc114601a codespell: Prune ignore list
d197474083 codespell: Ignore test output regexes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11388
2025-11-04 13:33:49 -05:00
Matthew Woehlke 7cc114601a codespell: Prune ignore list
Remove entries from the codespell ignore list that do not seem to be
present any more. Also, remove a deliberate typo and instead add a local
annotation to ignore it.

This list is still uncomfortably long, but unfortunately current
versions of codespell do not offer any granularity in between annotating
individual uses (which is not practical in most cases) or globally
ignoring words (which is overly broad and risks missing real errors).
2025-11-04 13:13:09 -05:00
Matthew Woehlke d197474083 codespell: Ignore test output regexes
Ignore RunCMake output regexes (i.e. *-stdout.txt, *-stderr.txt) when
checking spelling. Because these are regular expressions, they have a
higher likelihood of having false positives, and because they are
expected output, any text they contain ought to also appear in whatever
code generates it (or else, is probably text that depends on user input
and shouldn't be spell-checked anyway).
2025-11-04 13:12:56 -05:00
Brad King 519d69c92c Merge topic 'typos-1.39.0' into release-4.2
1405dc49e8 pre-commit: version bump `typos` and `sphinx-lint` hooks + fix found typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11380
2025-11-04 11:24:30 -05:00
Brad King 64f5c4d307 Merge topic 'fbuild_fix_superfluous_dirs' into release-4.2
2a5855f034 FASTBuild: fix superfluous directory creation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11379
2025-11-04 10:47:06 -05:00
Alex Turbov 1405dc49e8 pre-commit: version bump typos and sphinx-lint hooks + fix found typos 2025-11-03 10:18:16 -05:00
Eduard Voronkin 2a5855f034 FASTBuild: fix superfluous directory creation
Fixes: #27356
2025-11-03 09:39:16 -05:00
Brad King e8863b5a74 Merge topic 'ci-fedora-43' into release-4.2
2338d987d5 ci: use Fedora 43 images and environments
5219f383fe ci: update Fedora base images to Fedora 43
373e8ea652 clang-tidy: ignore warnings new in version 21
e12ce158bc clang-tidy: fix bugprone-unintended-char-ostream-output lint
2ca11db2e3 pre-commit: version bump `typos` hook plus fix found typos
d314d85ea5 Tests: Extend RunCMake.ParseImplicitLinkInfo for LLVMFlang 21.1.3
b7ad081f1a Tests: Fix RunCMake.CXXModules compilation with Clang 21

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11375
2025-10-31 07:12:26 -04:00
Brad King 2338d987d5 ci: use Fedora 43 images and environments 2025-10-30 17:46:06 -04:00
Brad King 5219f383fe ci: update Fedora base images to Fedora 43
Also update to typos 1.38.1.
2025-10-30 17:43:17 -04:00
Brad King 373e8ea652 clang-tidy: ignore warnings new in version 21
These warnings can be fixed in the future.  Ignore them for now.
2025-10-30 17:43:17 -04:00
Brad King e12ce158bc clang-tidy: fix bugprone-unintended-char-ostream-output lint 2025-10-30 17:43:17 -04:00
Alex Turbov 2ca11db2e3 pre-commit: version bump typos hook plus fix found typos
Backport commit 8de02a14c8 (ci(pre-commit): version bump `typos` hook
plus fix found typos, 2025-10-23) to the CMake 4.2 release branch.
2025-10-30 17:43:16 -04:00
Brad King d314d85ea5 Tests: Extend RunCMake.ParseImplicitLinkInfo for LLVMFlang 21.1.3 2025-10-30 17:43:16 -04:00
Brad King b7ad081f1a Tests: Fix RunCMake.CXXModules compilation with Clang 21
Clang 21 now enforces placement of the module declaration:

    .../scan_properties/module.cxx:7:8: error: module
       declaration must occur at the start of the translation unit
2025-10-30 17:40:02 -04:00
Brad King a86b6c4db4 CMake 4.2.0-rc2 v4.2.0-rc2 2025-10-30 09:03:07 -04:00
Brad King c727d96b40 Merge topic 'fbuild_compdb' into release-4.2
5e25ee691a FASTBuild: generate compile_commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11373
2025-10-30 08:57:58 -04:00
Brad King 28873cce5e Merge topic 'macos-no-per-arch-sysroot' into release-4.2
1925477cb7 macOS: Do not incorrectly search for per-arch SDKs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11372
2025-10-30 08:54:32 -04:00
Brad King db190bbe49 Merge topic 'tutorial-step-0' into release-4.2
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:12 -04:00
Brad King fb85cb7716 Merge topic 'vs-sln' into release-4.2
6ebf21a360 VS: Restore support for Intel Fortran projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11371
2025-10-30 08:49:05 -04:00
Eduard Voronkin 5e25ee691a FASTBuild: generate compile_commands
If `CMAKE_EXPORT_COMPILE_COMMANDS` is set use FASTBuild's `-compdb`
option in order to generate `compile_commands.json` file.

Fixes: #27345
2025-10-29 15:53:07 -04:00
Brad King 1925477cb7 macOS: Do not incorrectly search for per-arch SDKs
Extend commit a9b41195d2 (Handle multi-arch sysroots on Apple platforms,
2019-07-26, v3.17.0-rc1~287^2) to recognize versioned macOS SDK names.

Fixes: #27340
2025-10-29 14:50:51 -04:00
Brad King 6ebf21a360 VS: Restore support for Intel Fortran projects
Refactoring in commit 3882718872 (VS: Decouple solution generation from
`.sln` file format, 2025-09-15, v4.2.0-rc1~154^2~3) accidentally dropped
Fortran targets from the generated VS Solution.

Fixes: #27346
2025-10-29 11:55:53 -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 d98c9bf2cc Merge branch 'release-4.1' into release-4.2 2025-10-29 09:32:25 -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