Commit Graph

72475 Commits

Author SHA1 Message Date
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
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
Brad King
8bfd46b4f6 Merge topic 'doc-4.2-relnotes'
5e9722866a Help: Update Sphinx versionadded directives for 4.2 release
5c7e90d954 Help: Organize and revise 4.2 release notes
ec28123cb4 Help: Consolidate 4.2 release notes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11271
2025-10-09 10:19:28 -04:00
Dylan Ulis
765e420128 QCC: Remove "-Wp," prefix for qcc system include arguments
`-Wp` is not needed on modern QNX/QCC.
`-isystem` is supported directly since QNX 7.0

Fixes: #26912
2025-10-09 09:51:29 -04:00
Brad King
597e421ba3 Help: Remove incorrect Windows env var limitation from CTEST_PARALLEL_LEVEL
In commit 5de1e21659 (ctest: Allow passing -j without value to choose a
contextual default, 2024-03-06, v3.29.0-rc4~10^2) I misdiagnosed the
reason that the test could not set an empty environment variable on
Windows.  It is actually a limitation of `set(ENV{VAR})` inherited from
its implementation using `_wputenv`.  Process environment blocks can
contain empty environment variables.

Issue: #27285
2025-10-09 09:46:01 -04:00
Brad King
5e9722866a Help: Update Sphinx versionadded directives for 4.2 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v4.1.0 --overwrite
2025-10-09 09:38:20 -04:00
Brad King
5c7e90d954 Help: Organize and revise 4.2 release notes
Add section headers similar to the 4.1 release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.
2025-10-09 09:38:02 -04:00
Brad King
ec28123cb4 Help: Consolidate 4.2 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/4.2.rst`.
2025-10-09 09:36:44 -04:00
Brad King
6055a12d36 Help: Document default architecture when CMAKE_OSX_ARCHITECTURES is not set
Issue: #27293
2025-10-09 09:31:49 -04:00
Brad King
32689113d7 Merge topic 'genex-target-intermediate-dir'
f195c9ef2a genex: Add TARGET_INTERMEDIATE_DIR expression
5c5634db52 cmGeneratorExpressionNode: Factor out HasKnownObjectFileLocation check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11217
2025-10-09 09:12:40 -04:00
Martin Duffy
f195c9ef2a genex: Add TARGET_INTERMEDIATE_DIR expression
Fixes: #27196
2025-10-09 08:07:20 -04:00
Brad King
420be50b5e Merge topic 'depfile-empty'
2c300a4c0a Fix out-of-bounds read on empty gcc-style depfile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11293
2025-10-09 08:03:25 -04:00
Kitware Robot
48b5d61970 CMake Nightly Date Stamp 2025-10-09 00:04:45 -04:00
Tyler Yankee
c575d84555 Help: Use signature directive for cmake_path command
Using `signature` renders the anchor links for each sub-command, and is
consistent with the other `Help/command` pages which contain multiple
sub-commands.
2025-10-08 20:44:38 -04:00
Martin Duffy
5c5634db52 cmGeneratorExpressionNode: Factor out HasKnownObjectFileLocation check 2025-10-08 17:34:02 -04:00
Joerg Bornemann
2c300a4c0a Fix out-of-bounds read on empty gcc-style depfile
If a gcc dep file is read that contains no dependencies,
cmReadGccDepfile returns a valid std::optional containing an empty
vector. Check at the call sites in cmDependsCompiler whether the vector
is empty before trying to access the vector's elements.

Fixes: #27270
2025-10-08 11:37:15 -04:00
Brad King
81ee78a7e9 Merge topic 'update-kwsys'
77ea15b797 Tests: Add case covering `cmake -E env` with empty environment variable
209dfc51d3 Merge branch 'upstream-KWSys' into update-kwsys
92a7104600 KWSys 2025-10-08 (3bae03fe)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11288
2025-10-08 11:25:25 -04:00
Brad King
04c6c8fc09 Merge topic 'set-ENV-empty'
aa5711490f set: Explicitly unset empty environment variables on Windows
723a83d8cd set: Factor out helper to set environment variables
20761cf349 set: Add test cases for setting ENV{VAR} to empty
a878d1c490 Tests: Unset the PATH environment variable more explicitly where needed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11290
2025-10-08 11:20:36 -04:00
Brad King
77ea15b797 Tests: Add case covering cmake -E env with empty environment variable
Issue: #27285
2025-10-08 11:17:20 -04:00
Brad King
209dfc51d3 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2025-10-08 (3bae03fe)
2025-10-08 11:17:13 -04:00
KWSys Upstream
92a7104600 KWSys 2025-10-08 (3bae03fe)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit 3bae03fe5e4267117b7837eb8f1b498bea3b3c12 (master).

Upstream Shortlog
-----------------

Brad King (5):
      6b282151 SystemTools: Clarify UnPutEnv implementation comment with GNU runtime
      99d779f3 SystemTools: Simplify UnPutEnv implementation with MSVC
      523f9256 SystemTools: Implement HasEnv via GetEnvironmentVariableW on Windows
      a446aa49 SystemTools: Improve PutEnv for empty values on Windows
      0a58a55e SystemTools: Reduce allocation in GetEnv on Windows

Peter Kokot (1):
      45bb9a19 CMake: Remove unused CheckTypeSize module
2025-10-08 11:17:12 -04:00
Brad King
051b0efd7d Merge topic 'FindZLIB-static'
b2c059e68f FindZLIB: Find static libraries from upstream zlib's cmake-based build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11291
2025-10-08 09:36:08 -04:00
Brad King
af8180a5a9 Merge topic 'ticlang-c17'
3a34f7715e TIClang: Add flags for C17 standard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11285
2025-10-08 09:34:43 -04:00
Brad King
6fdb345f03 Merge topic 'sort-xcode-folders'
4ca5e5480a Xcode: Order targets alphabetically

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11289
2025-10-08 09:32:56 -04:00