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
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
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.
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.
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