Commit Graph

72497 Commits

Author SHA1 Message Date
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 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
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
Brad King 7095118a78 Merge topic 'fix-copy-on-error-directory-info' into release-4.2
657e9be724 file(CREATE_LINK): Document `COPY_ON_ERROR` behavior on directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11299
2025-10-12 09:20:18 -04:00
Brad King c2fc9da31f Merge topic 'cuda-msvc-defines' into release-4.2
614d295c1e VS: Compute MSVC character set in CUDA-only targets
19a61e56cf VS: Refactor MSVC character set selection
8a135ea018 Tests: Teach MSVC ABI defs cases to tolerate NVCC CUDA arch warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11302
2025-10-12 09:17:19 -04:00
Brad King 614d295c1e VS: Compute MSVC character set in CUDA-only targets
Fix commit 6874efb592 (MSVC: Always define a character set, 2025-09-24)
for CUDA in Visual Studio.
2025-10-10 17:07:36 -04:00
Brad King 19a61e56cf VS: Refactor MSVC character set selection 2025-10-10 16:55:02 -04:00
Brad King 8a135ea018 Tests: Teach MSVC ABI defs cases to tolerate NVCC CUDA arch warnings 2025-10-10 10:38:34 -04:00
Alex Overchenko 657e9be724 file(CREATE_LINK): Document COPY_ON_ERROR behavior on directories
Issue: #27294
2025-10-10 10:26:36 -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 106d2d3c4d Merge topic 'qcc-isystem' into release-4.2
765e420128 QCC: Remove "-Wp," prefix for qcc system include arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11295
2025-10-10 10:22:54 -04:00
Brad King 32d776ea0b Merge topic 'doc-ctest-env-whitespace' into release-4.2
597e421ba3 Help: Remove incorrect Windows env var limitation from CTEST_PARALLEL_LEVEL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11297
2025-10-10 10:21:44 -04:00
Brad King 706bf669e1 Merge topic 'doc-apple-arch-default' into release-4.2
6055a12d36 Help: Document default architecture when CMAKE_OSX_ARCHITECTURES is not set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: rumgot rumgotov <rumgot@gmail.com>
Merge-request: !11296
2025-10-10 10:19:10 -04:00
Brad King c555e10fd4 Tests: Use shorter paths in RunCMake.ExternalProject 2025-10-10 09:49:40 -04:00
Brad King 10556731a1 Begin 4.2 release versioning 2025-10-09 10:22:10 -04:00
Brad King 79bc6f6b60 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2025-10-09 10:20:36 -04:00