FDO pkg-config does not allow multiple output modes like --modversion
and --variable in the same query. Split them up into two separate
queries while retaining batching for the rest of the flags.
Fixes: #28194
Revert commit 25798c15 (UseSWIG: use $<SOURCE_PROPERTY> genex,
2026-06-05).
Moving source file properties evaluation from configuration
to generation time prevents the possibility to have the same source file,
in one directory, in different targets with different settings.
Revert to the previous implementation not using $<SOURCE_PROPERTY>
generator expression.
Fixes: #28193
Since commit 7566a477f7 (GNUInstallDirs: Factor out helper for special
absolute path logic, 2025-03-27, v4.1.0), when CMAKE_INSTALL_PREFIX is
under /opt/ (excluding /opt/homebrew), the special case FHS directories
include an extra path separator, resulting in values like /etc//opt/foo.
This is observed in CMAKE_INSTALL_FULL_SYSCONFDIR,
CMAKE_INSTALL_FULL_LOCALSTATEDIR, and CMAKE_INSTALL_FULL_RUNSTATEDIR
whenever their corresponding CMAKE_INSTALL_<dir> may be relative, as is
the case under policy CMP0192 OLD or if set explicitly while under
CMP0192 NEW (e.g. -DCMAKE_INSTALL_SYSCONFDIR=etc). Restore the previous
path calculation, which relies on the prefix starting with `/`.
Fixes: #28186
64fbf5bba4 SYCL: Don't use -shared for Intel device linking
46ec181d8e SYCL: Only use whole-archive device link when necessary
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12650
Flang gained -Xlinker only in LLVM 20, so the Apple linker flags added
by commit 18d65b9d4b (LLVMFlang: Fix Fortran shared library creation on
Apple platforms, 2026-09-23) fail with older Flang. For those versions
the flags now go through -Wl, with the install name joined to its flag.
Flang 20 and later keep the -Xlinker form.
Fixes: #28148
Revert commit d8ade0500e (Find{BLAS,LAPACK}: Provide full paths in
`{BLAS,LAPACK}_LIBRARIES` with NVPL, 2026-09-05). These variables
should supply full dependency, not just the immediate library file
returned by `get_target_property(IMPORTED_LOCATION_RELEASE)`.
Since the documentation regarding these two variables has been
updated, let's keep the old behavior which actually works better.
Issue: #28073
Add experimental support for SYCL under an experimental gate. The
IntelLLVM and Adaptivecpp compilers are recognized, as well as upstream
Clang with libsycl support.
Fixes: #27219, #27905
Since commit 1e35163ae8, the WHOLE_ARCHIVE feature is defined in the
linker configuration modules. OHOS had no such files, so
$<LINK_LIBRARY:WHOLE_ARCHIVE,...> failed there.
Add forwarding files to the Linux linker configuration, as done for
Android in commit d2997ab601. Unlike Android, fall back to LLD when the
linker cannot be identified, because the OHOS SDK toolchain file links
with -fuse-ld=lld.
54dcd459ff ci: Test Windows Clang modules without a developer environment
23df9ff972 c++modules: Improve clang stdlib detection on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12561
Allow the stdlib probe to guide modules.json discovery when using a
clang driver on Windows. Explicitly provided module metadata still takes
precedence, and this check fails if clang itself can't discover the
stdlib.
Fixes: #28035
NVIDIA CUDA links with `link.exe` directly, but had no
`CMAKE_CUDA_LINK_DEF_FILE_FLAG` and fell back to the global
`CMAKE_LINK_DEF_FILE_FLAG`. With IntelLLVM enabled in the same build
tree, that holds `/Qoption,link,/DEF:`, which `link.exe` ignores, so a
CUDA DLL exported nothing from its `.def` file. Commit 8b710d8264
(Linker: Generate per-language module -DEF: flags on Windows,
2025-05-28) covered the other Windows toolchains but missed CUDA.
Fixes: #25598
Issue: #26005
TclStub_FOUND also required TTK_STUB_LIBRARY, but Tk puts its ttk
stubs in the Tk stub library and has no separate one, so it was
false on standard installs. It now needs only TCL_STUB_LIBRARY,
which is what the docs say it reports.
Fixes: #28134
Tk 9 names its library with a "tcl9" prefix (tcl9tk90.lib,
libtcl9tk9.0.so), which our tk90/tk9.0 patterns don't match. We now
search for these names too, and also look in include/tcl-tk for the
headers, where Homebrew installs them.
Fixes: #28129
Package Android applications by driving the Android SDK build tools
(aapt2, d8, zipalign and apksigner) and the JDK directly, so that no
Gradle installation is needed. Java code is taken from sources, `.jar`
and `.aar` files. Maven dependencies, such as the AndroidX libraries,
can be listed in `CPACK_APK_MAVEN_DEPENDENCIES` to have them and their
dependencies downloaded at packaging time, resolved like Gradle does
from Gradle module metadata or POMs. Nothing is downloaded otherwise.
Like the Android Gradle plugin, the shared C++ runtime of the NDK is
packaged for the native libraries that `readelf` finds linked to it.
The native libraries of several ABIs are packaged into one APK by a
superbuild that builds each ABI with `ExternalProject` and lists the
build trees in `CPACK_INSTALL_CMAKE_PROJECTS`.
See: https://bugreports.qt.io/browse/QTBUG-106495
IntelLLVM links through the compiler driver, so its link directory
flag is wrapped in `/Qoption,link,`. MSVC and CUDA run `link.exe`
directly. When both are used in one build tree, the IntelLLVM value
of `CMAKE_LIBRARY_PATH_FLAG` leaked onto `link.exe` command lines.
Setting `CMAKE_<LANG>_LIBRARY_PATH_FLAG` per language, as was done
for `CMAKE_<LANG>_LINK_DEF_FILE_FLAG`, gives each link line the
spelling its own linker understands. The variable is now documented.
Fixes: #28116
- Update discover_tests to work with test_prep targets and ctest --out-of-date
- Extend behavior to gtest_discover_tests
- Don't treat non-built targets as always out of date
- Support imported targets in BUILD_DEPENDS
Issue: #28052, #28070
With two or more PROTOC_OPTIONS the custom command's comment picked up
the raw list separator, so the unquoted COMMENT expanded to several
arguments. Since CMP0175 that's a configure error under NEW and a
policy warning otherwise, and the comment only ever showed the last
option.
We're now joining the options with spaces before they go into the
comment, which is how upstream protobuf fixed the same code in v33.0
(protocolbuffers/protobuf@aa1f665cdc). The COMMENT argument is also
quoted now, and the module sets CMP0175 to NEW for its own
add_custom_command() call instead of inheriting the project's setting.
That keeps a stray separator from splitting the comment again, and it
stops the policy warning that pointed into this module.
Fixes: #28078