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
Using `signature` renders the anchor links for each sub-command, and is
consistent with the other `Help/command` pages which contain multiple
sub-commands.
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
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
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
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
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
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
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.
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
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