1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Commit Graph

72441 Commits

Author SHA1 Message Date
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
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
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
Brad King
957d4a2e5c Merge topic 'find_cuda_toolkit_stop_searching'
a345c0e193 FindCUDAToolkit: Don't keep searching when `CUDAToolkit_ROOT` is set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11227
2025-10-08 09:24:44 -04:00
Brad King
d5cfe692c9 Merge topic 'ci-valgrind'
e981fc4f4d gitlab-ci: add a job to test with Valgrind on Linux with Ninja
f1e8762a8b ci: support valgrind memcheck runs
f22d8a3f36 ci: support memcheck-testing external test processes
35337bcc06 gitlab-ci: report JUnit results for memcheck runs
8459ff022b ci: factor out memcheck "prep" logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11257
2025-10-08 09:11:58 -04:00
Kitware Robot
10ad3364d6 CMake Nightly Date Stamp 2025-10-08 00:05:03 -04:00
Brad King
cffa80c48d Merge topic 'fileapi-direct-dependencies'
f38f325e08 fileAPI: Add direct dependencies to target codemodel files
004d825f3e fileAPI: Add test coverage for interface direct and genex contexts
53ed1e5893 fileAPI: Fix wrong linking relationship in symbolic library test
1b764b6816 cmLinkItem: Remove redundant cmLinkImplItem class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Martin Duffy <martin.duffy@kitware.com>
Acked-by: Alex Overchenko <aleksandr9809@gmail.com>
Merge-request: !11219
2025-10-07 16:53:55 -04:00
Brad King
d30c0f53fc Merge branch 'release-4.1' 2025-10-07 16:47:59 -04:00
Brad King
ae2cdad16c Merge branch 'release-4.0' into release-4.1 2025-10-07 16:47:47 -04:00
Brad King
bc5f07bed6 Merge branch 'release-4.0' 2025-10-07 16:47:08 -04:00
Brad King
f8b6b5e66b Merge branch 'release-3.31' 2025-10-07 16:47:04 -04:00
Brad King
32e48b11c8 Merge topic 'backport-ci-xcode-26'
9d302ecd47 ci: update macOS jobs to use Xcode 26.0 in CMake 3.31 branch
f6f1c5ca1f Tests: Teach RunCMake to ignore Xcode an IDERunDestination warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11292
2025-10-07 16:46:44 -04:00
Brad King
d4837302fe Merge branch 'release-3.31' into release-4.0 2025-10-07 16:45:24 -04:00
Brad King
892b0de5d4 Merge topic 'backport-ci-xcode-26' into release-3.31
9d302ecd47 ci: update macOS jobs to use Xcode 26.0 in CMake 3.31 branch
f6f1c5ca1f Tests: Teach RunCMake to ignore Xcode an IDERunDestination warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11292
2025-10-07 16:44:28 -04:00
Brad King
9d302ecd47 ci: update macOS jobs to use Xcode 26.0 in CMake 3.31 branch 2025-10-07 14:14:26 -04:00
Brad King
f6f1c5ca1f Tests: Teach RunCMake to ignore Xcode an IDERunDestination warning
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] IDERunDestination: ...

Teach RunCMake to drop such incidental lines before matching against
expected output.

Backport commit edaa6ed06a (Tests: Teach RunCMake to ignore Xcode an
IDERunDestination warning, 2025-09-19, v4.1.2~9^2~1) to CMake 3.31.
2025-10-07 14:12:53 -04:00
winapiadmin
b2c059e68f FindZLIB: Find static libraries from upstream zlib's cmake-based build
Upstream zlib commit `74247f0947` (CMake: Install libs with static and
debug suffix., 2024-11-30) added suffix `s` to static library names.
2025-10-07 13:38:24 -04:00
Brad King
aa5711490f set: Explicitly unset empty environment variables on Windows
KWSys's SystemTools::PutEnv implementation, on Windows, has long
interpreted `A=` as unset.  This differs from the behavior on other
platforms.  Code the distinction explicitly in `set(ENV{VAR})`.

Issue: #27285
2025-10-07 11:33:03 -04:00
Brad King
723a83d8cd set: Factor out helper to set environment variables 2025-10-07 11:32:56 -04:00
Brad King
20761cf349 set: Add test cases for setting ENV{VAR} to empty
The behavior differs by platform and if the variable is already set.
Encode existing behavior in tests to preserve it until intentionally
changed.

Issue: #27285
2025-10-07 11:32:53 -04:00
Brad King
a878d1c490 Tests: Unset the PATH environment variable more explicitly where needed
Previously we relied on setting an environment variable to empty to
unset it on Windows.
2025-10-07 11:32:48 -04:00
Daniel Körner
3a34f7715e TIClang: Add flags for C17 standard
C17 is supported since version 1.3.
2025-10-07 11:11:52 -04:00
Peter Steneteg
4ca5e5480a Xcode: Order targets alphabetically
Fixes: #21659
2025-10-07 11:07:11 -04:00
Ben Boeckel
e981fc4f4d gitlab-ci: add a job to test with Valgrind on Linux with Ninja 2025-10-07 10:47:42 -04:00
Ben Boeckel
f1e8762a8b ci: support valgrind memcheck runs 2025-10-07 10:47:42 -04:00
Craig Scott
f38f325e08 fileAPI: Add direct dependencies to target codemodel files
This adds the following new arrays, which together capture all direct
dependencies and interface dependencies of a target:

- linkLibraries
- interfaceLinkLibraries
- compileDependencies
- interfaceCompileDependencies
- objectDependencies
- orderDependencies

Fixes: #21995, #25213
2025-10-07 10:44:28 -04:00
Craig Scott
004d825f3e fileAPI: Add test coverage for interface direct and genex contexts 2025-10-07 10:44:28 -04:00
Craig Scott
53ed1e5893 fileAPI: Fix wrong linking relationship in symbolic library test
Commit 62a1d3e7f1 (FileAPI: Add symbolic property to targets, 2025-09-30)
contained an error in added test code where a wrong library was linked.
The naming of the targets involved make clear the intended linking
relationship, but nothing in the test was actually testing or relying on
that relationship so it went undetected.
2025-10-07 10:44:28 -04:00
Craig Scott
1b764b6816 cmLinkItem: Remove redundant cmLinkImplItem class
The cmLinkImplItem class used to contain some additional members
to support the CMP0027 policy. Since the CMP0027 policy and those
associated members were removed, the cmLinkImplItem class has been
a plain wrapper around cmLinkItem with no additional members.
It is no longer needed and cmLinkItem can be used directly wherever
cmLinkImplItem was used previously.
2025-10-07 10:44:28 -04:00
Brad King
0181fb4cc5 Merge topic 'define-msvc-charset'
b554dead95 Tests: Cover CMP0203 and CMP0204 on all platforms
6874efb592 MSVC: Always define a character set
2cae68ecbe Source: Minor optimizations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11269
2025-10-07 10:43:08 -04:00
Alex Overchenko
b554dead95 Tests: Cover CMP0203 and CMP0204 on all platforms 2025-10-07 09:29:42 -04:00
AJIOB
6874efb592 MSVC: Always define a character set
When targeting the MSVC ABI, define `_MBCS` by default if the project
does not define `_SBCS` or `_UNICODE`.  Visual Studio has long defined
one of the three character set macros automatically.  For consistency,
define it when compiling for the MSVC ABI with other generators.
Add policy CMP0204 for compatibility.

Fixes: #27275
2025-10-07 09:29:32 -04:00
AJIOB
2cae68ecbe Source: Minor optimizations 2025-10-07 09:29:18 -04:00
Brad King
927ccf212f Merge topic 'help-TRYRUN_OUTPUT_STDOUT'
6d61783103 Help: Document try_run output cache entries for cross-build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11284
2025-10-07 09:02:32 -04:00
Brad King
bd0351c73d Merge branch 'release-4.1' 2025-10-07 08:58:53 -04:00
Brad King
0af6751e68 Merge topic 'ninja-trailing-newline-comment'
12a225d56d Ninja: handle trailing newlines in variable stanzas

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11286
2025-10-07 08:58:52 -04:00
Brad King
58880d6773 Merge topic 'ninja-trailing-newline-comment' into release-4.1
12a225d56d Ninja: handle trailing newlines in variable stanzas

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11286
2025-10-07 08:58:51 -04:00