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
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
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
In commit f7b0ddbe92 (gitlab-ci: add a series of jobs to perform
coverage, 2025-09-24) we accidentally copied the C++11 specification
from the `fedora42-ninja` jobs. Drop it.
When a variable ends with a newline, the Ninja generator escapes it as
expected with `$\n`. However, when writing it out, whitespace is
trimmed. This leaves a trailing `$` instead which consumes the newline
and masks the following stanza. In a custom command, this hides the
`restat = 1` setting.
Detect this case and restore the newline as necessary.
See: #25983
8f166fa51e ci: Add jobs to perform coverage with BullseyeCoverage on Linux
cb3d917289 ci: Add script to install BullseyeCoverage in Linux jobs
2548b6e24d ci: add pre-test step
8d0ecda821 ci: add pre-build step after configure but before build
206b831973 ci: rename pre-build step to pre-configure since that is when it runs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !11283
- This module previously didn't define the CxxTest_FOUND result variable
consistently if neither Python nor Perl were found.
- Documentation is also updated a bit further to note that Perl-based
test generator script has been removed in CxxTest version 4.0.
- Internal comments synced.
- Python_FOUND result variable used.
Issue: #27242
In commit 9d44a77454 (find_*: Explicitly normalize found paths as they
exist on disk, 2024-10-17, v4.0.0-rc1~597^2~1), we removed path
normalization from the internal `cmSearchPath::AddPathInternal` helper.
Most call sites were updated to normalize input paths first, but search
paths derived from `<PackageName>_ROOT` CMake variables are no longer
normalized. Instead we normalize the path to the file found after
searching.
When `find_package` "config" mode considers a candidate CMake package
configuration file, normalize its path before loading the adjacent
package version file so that the latter is loaded by absolute path.
Otherwise `cmMakefile::ReadDependentFile` interprets a relative path
with respect to the current source directory rather than the current
working directory.
Fixes: #27279
In commit 9d44a77454 (find_*: Explicitly normalize found paths as they
exist on disk, 2024-10-17, v4.0.0-rc1~597^2~1), we removed path
normalization from the internal `cmSearchPath::AddPathInternal` helper.
Most call sites were updated to normalize input paths first, but search
paths derived from `<PackageName>_ROOT` CMake variables are no longer
normalized. Instead we normalize the path to the file found after
searching.
When `find_package` "config" mode considers a candidate CMake package
configuration file, normalize its path before loading the adjacent
package version file so that the latter is loaded by absolute path.
Otherwise `cmMakefile::ReadDependentFile` interprets a relative path
with respect to the current source directory rather than the current
working directory.
Fixes: #27279