Add import/export support and documentation for the SPDX_LICENSE
target property. A target's license can be specified by setting
this property to an SPDX license expression. CMake and CPS-format
export files generated with `export()` or `install()` will
retain the license information. CMake also imports the license
property for imported targets.
Closes: #26706
On Windows, the only reliable way to read/write Unicode text from/to a
Console is to use `ReadConsoleW` and `WriteConsoleW` and convert from/to
wide-character encoding. When `cin`, `cout`, and/or `cerr` are attached
to a Windows Console, use a custom C++ `streambuf` to handle the I/O.
This will replace KWSys ConsoleBuf, whose implementation is more complex
to support narrow output streams on Windows non-UTF-8 narrow encodings.
We only need to support UTF-8.
Issue: #26924
Provide a useful warning if an invalid UUID is given in a
`CMAKE_EXPERIMENTAL_` variable. This can occur if a different CMake
version is used than the one that the feature was implemented with, or
if there is a simple typo in the value. It should reduce confusion with
the use of experimental features.
Co-authored-by: Brad King <brad.king@kitware.com>
When the arrays are empty, the YAML ends up with `foo:` which is
equivalent to `foo: null`, not `foo: []`. Avoid writing the key when it
has no information to provide.
Move logic from commit c85524a94a (Ensure stdin, stdout, and stderr pipes
are always open, 2019-05-02, v3.15.0-rc1~171^2) and commit 96010cc968
(Ensure stdin, stdout, stderr FILE streams are open on Windows, 2024-01-24,
v3.29.0-rc1~65^2) to a dedicated source. Expose it through an `Init` class
constructor to make it optionally available during static initialization.
Issue: #26924
EXCLUDE_EMPTY_DIRECTORIES option excludes empty directories under the
directory to install. A directory is considered not empty if and only if
the directory contains at least one file or one symbolic link or one
none-empty sub-directory.
Closes: #19189
149ee3b4bc Xcode: Use DEBUGGER_WORKING_DIRECTORY as a fallback for scheme work dir
0f1b9ef32a Help: VS_DEBUGGER_WORKING_DIRECTORY precedence
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10736
Since commit 6baf65ec46 (ASM: Do not consider MSVC C/CXX compiler for
generic ASM, 2025-04-08) we no longer mistake `cl` for an assembler.
However, some projects unconditionally enable ``ASM``, which worked
on Windows only due to that bug. Restore compatibility with such
projects by guarding the change behind a new policy ``CMP0194``.
Fixes: #26907
Issue: #26617
This also means when XCODE_SCHEME_WORKING_DIRECTORY is
set and a Xcode generator is used, that property will be used when
writing the debugger field in the file API replies.
Fixes: #26909
bf1bb62e74 macOS: Restore support for LLVM/Clang without explicit CMAKE_OSX_SYSROOT
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10734
bf1bb62e74 macOS: Restore support for LLVM/Clang without explicit CMAKE_OSX_SYSROOT
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10734