Commit Graph

72510 Commits

Author SHA1 Message Date
Brad King c1565ed4e5 Merge topic 'fix-typos' into release-4.2
60273a364c Tests/RunCMake: fix version typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11325
2025-10-21 11:21:42 -04:00
Brad King f47347beae Merge topic 'test-cleanup' into release-4.2
e0ee6556a8 Tests: Remove outdated CMake.PolicyCheck test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11330
2025-10-21 11:18:59 -04:00
Brad King e1b0acc0c0 Merge branch 'release-4.1' into release-4.2 2025-10-21 11:06:50 -04:00
Brad King 96d49b3fa2 Merge topic 'backport-3.31-ios-compiler-inspection' into release-4.2
636d3a7a2f Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11333
2025-10-21 11:04:13 -04:00
Brad King 458ef4ad11 Merge branch 'release-4.0' into release-4.1 2025-10-21 11:03:29 -04:00
Brad King 3a953fcfff Merge branch 'release-3.31' into release-4.0 2025-10-21 11:03:18 -04:00
Brad King a606bc4a7f Merge topic 'backport-3.31-ios-compiler-inspection' into release-4.1
636d3a7a2f Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11333
2025-10-21 11:03:01 -04:00
Brad King 42b3b74bde Merge topic 'backport-3.31-ios-compiler-inspection' into release-4.0
636d3a7a2f Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11333
2025-10-21 11:02:39 -04:00
Brad King d83b2e8fe0 Merge topic 'backport-3.31-ios-compiler-inspection' into release-3.31
636d3a7a2f Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11333
2025-10-21 11:01:39 -04:00
Brad King 636d3a7a2f Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31
Backport commit 79a83ddb08 (Apple: Enable linking during
iOS/tvOS/visionOS/watchOS toolchain inspection, 2024-11-14,
v4.0.0-rc1~471^2) to 3.31.

Since commit 11da882a12 (Apple: Introduce separate system name for iOS,
tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) our toolchain
inspection steps, like ABI detection, tell `try_compile` to use a
`STATIC_LIBRARY` instead of an `EXECUTABLE`.  This was needed at the
time to avoid codesign requirements.  However, commit d3a64c4e3f (Xcode:
Explicitly turn off signing in try_compile projects, 2020-07-16,
v3.19.0-rc1~483^2) introduced a more general solution to that problem.
Restore linking during toolchain inspection so that we can detect and
identify the linker.

Suggested-by: Marc Chevrier <marc.chevrier@gmail.com>
Fixes: #26443
2025-10-21 09:22:41 -04:00
Brad King b01cc7f792 Merge topic 'doc-CMP0199-relnote' into release-4.2
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:06 -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 e0ee6556a8 Tests: Remove outdated CMake.PolicyCheck test
Since commit dade821948 (cmPolicies: Reduce boilerplate in policy table
entries, 2024-11-13, v4.0.0-rc1~481^2~3), or perhaps earlier formatting
changes, the `grep` performed by this test is non-functional.
2025-10-20 13:55:21 -04:00
Brad King f0422c006c Merge topic 'pch-reuse-from-without-pch-warning' into release-4.2
cb6423703a PrecompileHeaders: downgrade `REUSE_FROM` without a PCH to a warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11318
2025-10-20 13:47:48 -04:00
Brad King c88b1acec5 Merge topic 'fbuild_ide_args' into release-4.2
31b51340a1 FASTbuild: allow setting custom IDE args

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11319
2025-10-20 13:46:05 -04:00
Brad King 1a4b9017a3 Merge branch 'release-4.1' into release-4.2 2025-10-20 13:43:36 -04:00
Brad King 2813b08d69 Merge topic 'collect-genex-fix' into release-4.2
6e637b1102 install(PACKAGE_INFO): Fix error when usage requirements contain certain genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11322
2025-10-20 13:42:49 -04:00
Brad King a2ebda45e2 Merge topic 'collect-genex-fix' into release-4.1
6e637b1102 install(PACKAGE_INFO): Fix error when usage requirements contain certain genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11322
2025-10-20 13:41:30 -04:00
AJIOB 60273a364c Tests/RunCMake: fix version typo 2025-10-19 07:55:13 +03:00
Ben Boeckel cb6423703a PrecompileHeaders: downgrade REUSE_FROM without a PCH to a warning
Prior to f9bc615d (pchreuse: ban PCH reuse from targets which disable
PCH, 2025-06-15), using a target without PCH as a `REUSE_FROM` target
was not an error. Some projects had been doing this unknowingly.
Downgrade the fatal error into a warning so that such projects can at
least continue to build.

Fixes: #27316
2025-10-17 12:00:40 -04:00
Martin Duffy 6e637b1102 install(PACKAGE_INFO): Fix error when usage requirements contain certain genex
Since commit 13c7bb5b0c (cmGeneratorExpression: Update strip function to
collect parsed expressions, 2025-04-08, v4.1.0-rc1~361^2~1), the logic
to strip generator expressions would error if the stripped expressions
were being collected and an expression without a `:` was found inside an
expression with a `:`. This resulted in an error when exporting a target
that contained such a generator expression in its link libraries or
compile definitions.

Address the error by checking whether the latest `$<` proceeded the
latest `:`.
2025-10-17 11:34:43 -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 4b5233e3e7 Merge topic 'tutorial-fix-ipo' into release-4.2
058511c6b6 Tutorial: Update IPO example in Step 6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11316
2025-10-17 10:10:21 -04:00
Brad King e879995896 Merge topic 'fix-tests-regex' into release-4.2
62b112ee25 Tests/RunCMake: Match CMakeLists.txt file name more precisely
06ccd15457 Tests/RunCMake: Match xxx.cmake file name more precisely

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11317
2025-10-17 10:09:10 -04:00
AJIOB 62b112ee25 Tests/RunCMake: Match CMakeLists.txt file name more precisely 2025-10-16 17:42:12 +03:00
AJIOB 06ccd15457 Tests/RunCMake: Match xxx.cmake file name more precisely 2025-10-16 17:42:12 +03:00
Brad King 42c7246dca CMake 4.2.0-rc1 v4.2.0-rc1 2025-10-16 09:11:41 -04:00
Vito Gamberini 058511c6b6 Tutorial: Update IPO example in Step 6 2025-10-16 09:09:51 -04:00
Brad King 773cee16d4 Merge topic 'fix_regex_in_tests' into release-4.2
638cf8f194 Tests/RunCMake: Match CMakeLists.txt file name more precisely

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11312
2025-10-16 09:07:23 -04:00
Brad King dfd70ad195 Merge topic 'fbuild_fix_globbing' into release-4.2
6fd6bfab6f FASTBuild: fix globbing for large projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: 风之凌殇 <fzls.zju@gmail.com>
Merge-request: !11310
2025-10-16 08:55:02 -04:00
Hanna Rusakovich 638cf8f194 Tests/RunCMake: Match CMakeLists.txt file name more precisely 2025-10-15 09:39:01 -04:00
Eduard Voronkin 6fd6bfab6f FASTBuild: fix globbing for large projects
FASTBuild will replace `%1%` with
all the glob matches, which might
exceed command line limit on Windows.
Moreover, we don't need to pass all the
matches to the VerifyGlobs.cmake script.

Fixes: #27305
2025-10-15 09:17:41 -04:00
Brad King b230eb2302 Merge topic 'fix-export-link-interfaces' into release-4.2
b209c41dfa export(TARGETS): Restore EXPORT_LINK_INTERFACE_LIBRARIES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11309
2025-10-15 09:09:57 -04:00
Taylor Sasser b209c41dfa export(TARGETS): Restore EXPORT_LINK_INTERFACE_LIBRARIES
Refactoring in commit 998495cb49 (cmExportCommand: Port to
cmSubcommandTable, 2025-07-15) accidentally removed support for the
`EXPORT_LINK_INTERFACE_LIBRARIES` argument.  Restore it with a test.

Fixes: #27302
2025-10-14 13:03:22 -04:00
Brad King 85eb60b7ff Merge topic 'install-export-error-on-empty' into release-4.2
b9f3adb0a6 install(EXPORT): Fail earlier if EXPORT is missing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11301
2025-10-14 12:51:47 -04:00
Matthew Woehlke b9f3adb0a6 install(EXPORT): Fail earlier if EXPORT is missing
Add an explicit check in `install(EXPORT)` that the export name is
non-empty. Since an empty-named export set will never exist, this is
always an error. Previously, however, the error would not be caught
until generate time. Now an error will be produced immediately.
2025-10-14 11:52:03 -04:00
Brad King caef2113e6 Merge topic 'patch-find-modules-missing-found-vars' into release-4.2
c8ea0ba3be Find*: Add missing <PackageName>_FOUND variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11303
2025-10-14 11:47:46 -04:00
Brad King 6843f4b62a Merge topic 'patch-FindLua-version-51' into release-4.2
b4a08078d6 FindLua51: Use Lua51_VERSION result variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11306
2025-10-14 11:46:25 -04:00
Brad King 1b9dbb6c90 Merge topic 'patch-FindOpenMP' into release-4.2
e5aa17333d FindOpenMP: Set the version result variable and update docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11304
2025-10-14 11:44:40 -04:00
Brad King 0279505105 Merge topic 'find_cuda_toolkit_run_nvcc_with_ccbin' into release-4.2
4c3480fc0a CUDAToolkit: Use correct target paths from nvcc when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11228
2025-10-14 11:43:25 -04:00
Brad King 6b57a8435f Merge topic 'external-project-env-mod-lists' into release-4.2
9cb590b843 ExternalProject: Fix lists and empty commands with environment modification
2e0a8455b3 Tests: Match expected environment modification more completely
819c6177b8 Tests: Match expected environment modification more consistently
c555e10fd4 Tests: Use shorter paths in RunCMake.ExternalProject

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11272
2025-10-14 11:40:33 -04:00
Peter Kokot b4a08078d6 FindLua51: Use Lua51_VERSION result variable
If using both FindLua and FindLua51 modules, the FindLua51 and Lua 5.2
or newer is found, FindLua51 module can set the Lua_VERSION variable to
empty value. Instead, the Lua51_VERSION can be used to bypass this
issue.

Issue: #27088
2025-10-13 12:10:24 -04:00
Peter Kokot e5aa17333d FindOpenMP: Set the version result variable and update docs
* This module previously didn't define the OpenMP_VERSION result
  variable.
* Added CMake versions to variables when they were provided by the
  module.
* Synced docs.
2025-10-13 12:09:54 -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
Robert Maynard 4c3480fc0a CUDAToolkit: Use correct target paths from nvcc when cross-compiling
This fixes issues where FindCUDAToolkit would find host
host platform libraries when nvcc -ccbin pointed to compiler of
a different CPU architecture.
2025-10-13 11:04:10 -04:00
Evan Wilde 9cb590b843 ExternalProject: Fix lists and empty commands with environment modification
Fix two bugs from commit e301cbffcc (ExternalProject: Set environment
variables, 2025-04-09):

* Do not flatten lists in command arguments when adding env mods.

* Remove empty `COMMAND`s without injecting corresponding env mods.

Fixes: #27125
Fixes: #27126
Co-authored-by: Brad King <brad.king@kitware.com>
2025-10-13 10:28:17 -04:00
Brad King da592d67b1 Merge topic 'cuda-msvc-defines' into release-4.2
948b2fe31a CMP0204: Remove redundant cases from RunCMake.MsvcCharsetDefines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11307
2025-10-13 10:20:54 -04:00
Brad King 948b2fe31a CMP0204: Remove redundant cases from RunCMake.MsvcCharsetDefines
A single executable for each policy/charset combination is sufficient.
The behavior is the same across target types.

The "OLD" cases are not needed because "WARN" has the same behavior.

The `-D` cases are not needed because `target_compile_definitions`
strips the `-D` prefix before populating `COMPILE_DEFINITIONS`.
2025-10-12 11:11:41 -04:00
Brad King 2e0a8455b3 Tests: Match expected environment modification more completely 2025-10-12 10:33:52 -04:00
Brad King 819c6177b8 Tests: Match expected environment modification more consistently
Revert the regex change from commit 01147454e7 (FASTBuild: Add
generator, 2025-07-30) and revise the build output to match anyway.
The actual problem was that build and install steps are driven through
a nested `cmake --build`, and `fbuild` prefixes the first line of build
output.  Add an innocuous first line so we can match the intended lines
consistently across generators.
2025-10-12 10:33:14 -04:00