Commit Graph

15811 Commits

Author SHA1 Message Date
Brad King
b40740f28a FindVulkan: Do not search bin directories for libraries
On Windows we need `.lib` import libraries, not `.dll` runtime binaries.
2026-02-23 14:18:35 -05:00
Brad King
947adbba91 FindVulkan: Use ENV{VULKAN_SDK} only if it exists 2026-02-23 14:18:35 -05:00
Brad King
1584c644d2 Merge topic 'FindPython-ARCHITECTURE-handling' into release-4.3
51e1459947 FindPython: enhance ARCHITECTURE detection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11716
2026-02-23 09:35:00 -05:00
Marc Chevrier
51e1459947 FindPython: enhance ARCHITECTURE detection
Fixes: #27619
2026-02-20 17:48:50 +01:00
Ben Boeckel
108d86f28d Modules/*Compiler: reword errors about invalid variable settings
The prior wording could be confusing if "compiler set" is detected as a
noun rather than "set" as a verb.

See: https://discourse.cmake.org/t/cmake-3-29-can-not-find-compiler-set-for-intel-ifx/11712
2026-02-20 09:03:23 -05:00
Brad King
300f9af15c Merge topic 'doc-GenerateExportHeader' into release-4.3
4671e77845 GenerateExportHeader: Fix FILE_SET example BASE_DIRS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11711
2026-02-19 10:37:20 -05:00
Brad King
4671e77845 GenerateExportHeader: Fix FILE_SET example BASE_DIRS
In commit 12ec3270c4 (GenerateExportHeader: Extend documentation,
2025-05-06, v4.1.0-rc1~214^2) we added a `BASE_DIRS` example value using
a generator expression that cannot be correctly consumed after export.
Update the example to use `CMAKE_CURRENT_BINARY_DIR`, which is where
`generate_export_header` places the header anyway.  Also drop the
explicit `target_include_directories`, as it is not needed when
using a file set for the header.

Closes: #27620
2026-02-19 09:05:58 -05:00
Alexander Neundorf
8bb0eef8e6 FASTBuild: make it work with non-US installations of MSVC
The fastbuild generator uses clui.dll directly, and assumed it is in
the 1033/ subdirectory. But this doesn't exist on non-US installations
of Visual Studio. With this patch cmake searches for clui.dll, so it can
use the correct path. If the env. var VSLANG is set, it tries that first,
then it tries 1033/ and if none of the two exists, it takes the first
one it finds.

Fixes: #27535
2026-02-16 10:33:20 -05:00
Brad King
6741ac7186 Merge topic 'nvcc_handle_env_variables_with_special_names'
37777a66e3 CUDA: Handle env variables that clash with nvcc magic keywords

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11661
2026-02-16 09:16:19 -05:00
Brad King
f5a1206794 Merge topic 'fix-lexer-multiline-strings'
b88b7e7c18 Help: Fix lexing of multi-line strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11691
2026-02-16 08:47:14 -05:00
Robert Maynard
37777a66e3 CUDA: Handle env variables that clash with nvcc magic keywords
On windows when you run `nvcc -v` all the env variables will
be printed before nvcc verbose output. This allows us to handle
the cases where env variable exists with the same name as a magic
nvcc keyword we parse
2026-02-14 15:54:46 -05:00
Matthew Woehlke
b88b7e7c18 Help: Fix lexing of multi-line strings
Teach our CMake lexer to recognize `[[...]]` multi-line strings, as used
in some 'check source compiles/runs' examples to pass literal C/C++ code
through a CMake function. Previously, this resulted in the lexer trying
to parse such code as CMake, which is obviously incorrect. Also, use the
new `[[` syntax in more places.

Note that, because `[[...]]` can also show up in some instances denoting
optional arguments, we only consider `[[` with no `=` as a string if the
`[[` is followed by a non-identifier character. This heuristic seems to
work for most existing usages.

Co-Authored-By: Georg Brandl <georg@python.org>
2026-02-13 13:36:59 -05:00
Nilsen84
ed0f48e79b clang-cl: use gcc depfiles over /showIncludes
This enables `#embed` dependencies when using `clang-cl`.

Fixes: #27594
2026-02-13 10:44:50 -05:00
Brad King
1ebfb6cb03 Merge topic 'cmake-locale'
d284ce2fd6 Initialize character set encoding on program startup
6ec707312d Make character classification locale-independent
ea47c154e5 Make case-dependent operations locale-independent
c81909f842 Merge branch 'upstream-KWSys' into cmake-locale
5a187b69e7 KWSys 2026-02-11 (dcab76ba)
55842d16ac cmFileCommand: Adopt `file://` URL compatibility helper
6fe7acfe1d curl: Build with support for wide-character filesystem APIs on Windows
9a2ebd7f25 Tests: Add RunCMake.string case covering TOLOWER and TOUPPER with UTF-8
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Overchenko <aleksandr9809@gmail.com>
Merge-request: !11647
2026-02-11 12:39:36 -05:00
Brad King
0aa7e258d4 Merge topic 'doc-ctest-link'
01a47a790b Help: Link `CTEST_*` variables to dashboard client
12a0ebe96a Help/CTest: Improve formatting and grammar

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11677
2026-02-11 12:05:29 -05:00
Ben Boeckel
75a30136a1 c++modules: Persist CMAKE_CXX_STDLIB_MODULES_JSON
And change checks to look for a value rather than definition. This fix
keeps the same set of test cases in `RunCMake.CXXModules` selected as
before.

Fixes: #27589
2026-02-10 21:07:29 -05:00
Brad King
961ed3f2e9 Merge topic 'hip-windows-clang'
73051ad572 fix: build HIP on Windows with MSVC-style clang-cl.exe

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11663
2026-02-10 11:35:47 -05:00
Brad King
b630ddef9f Merge topic 'FindBoost-1.89-1.90'
a1aa530be7 FindBoost: Add support for Boost 1.90
468873faab FindBoost: Add support for Boost 1.89

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11674
2026-02-10 11:25:52 -05:00
Tyler Yankee
12a0ebe96a Help/CTest: Improve formatting and grammar 2026-02-10 09:59:18 -05:00
Brad King
a1aa530be7 FindBoost: Add support for Boost 1.90
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_90_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.90.0 source tree.
They differ from 1.89's dependencies only in that
a new Boost.Cobalt component was added.
2026-02-09 12:17:52 -05:00
Brad King
468873faab FindBoost: Add support for Boost 1.89
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_89_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.89.0 source tree.
They are the same as 1.88's dependencies, so just update
the version check for warning about newer versions.
2026-02-09 12:14:59 -05:00
Brad King
1b889d9b6d FindLibLZMA: Avoid unnecessary UTF-8 sequences in documentation 2026-02-08 16:16:20 -05:00
Brad King
e686b86649 Merge topic 'import-std-no-experimental'
70c1f0f43d Experimental: Remove import std experimental gate

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11657
2026-02-08 09:18:01 -05:00
Vito Gamberini
70c1f0f43d Experimental: Remove import std experimental gate
Fixes: #27571
2026-02-07 09:03:43 -05:00
Ayush Singh
5c1b0a6b7e Rust: Add experimental support with Ninja
The TU for Rust is a crate, not per-source.  `rustc` expects entry file
to TU as input, and cannot work with object files.  So we need to have
one-step build/link in most cases, similar to what old Swift was doing.

Issue: #25492
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2026-02-06 11:32:56 -05:00
Gavin Zhao
73051ad572 fix: build HIP on Windows with MSVC-style clang-cl.exe 2026-02-05 18:55:24 -05:00
Brad King
9e5d338dd9 Merge topic 'lang-link-flags'
98f9874703 cmake: Add per-language link flags for all target types
63858fc3e0 Tests: Factor out LINKER: reference file generation
399288871e cmLocalGenerator: Factor out link flag parsing
82913923cd try_compile: Reflow comments per `clang-format`
7b4b556e2d Help: Fix description of `CMAKE_*_LINKER_FLAGS` variables
29b1d0baa9 Help/try_compile: Remove extraneous `versionadded` policy note
5ecee0db7b cmLocalGenerator: De-duplicate static linker flags lookup
bc1847c70b cmLocalGenerator: De-duplicate target property link flags lookup
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11611
2026-02-03 11:22:36 -05:00
Tyler Yankee
98f9874703 cmake: Add per-language link flags for all target types
Previously, `CMAKE_<LANG>_LINK_FLAGS` was an undocumented variable used
for linking executables only. Re-spell that variable mirroring the
existing spellings for shared and module libraries, and add policy
CMP0210 to preserve compatibility.

Then, repurpose `CMAKE_<LANG>_LINK_FLAGS` to provide a variable to be
used for per-language link flags for all target types, along with a
per-configuration variant. These are added to the `<LINK_FLAGS>` rule
placeholder in the generators.

Fixes: #21934
Relates: #25620

Co-authored-by: Brad King <brad.king@kitware.com>
2026-01-31 19:37:09 -05:00
Charlie Savage
fe006b5e9d FindRuby: Only search for released Ruby versions 2026-01-26 14:25:59 -08:00
Charlie Savage
82d39e5a7c FindRuby: Fix cache strings 2026-01-26 13:16:41 -08:00
Charlie Savage
a6a27d9160 FindRuby: Change MESSAGE to message. 2026-01-26 13:16:14 -08:00
Charlie Savage
af39d00aaa FindRuby: Fix debug message to output correct variable. 2026-01-26 13:15:36 -08:00
Brad King
1e4f9c2394 macOS: Remove outdated condition for -search_paths_first link flag
We no longer support versions of macOS older than 10.4.
2026-01-26 12:19:08 -05:00
Charlie Savage
c5e7cb691c FindRuby: Add support for interpreter and development components 2026-01-23 10:35:43 -05:00
Charlie Savage
dc8e05c4d2 FindRuby: Simplify finding the Ruby library - Ruby already knows! 2026-01-23 10:35:43 -05:00
Charlie Savage
b192f706aa FindRuby: Remove broken, untested and unmaintained cross-compiling support 2026-01-23 10:35:43 -05:00
Charlie Savage
ee75b3e7b4 FindRuby: Clean up variables read from Ruby 2026-01-23 10:35:43 -05:00
Charlie Savage
ba37066185 FindRuby: Versions are strings not paths. 2026-01-23 10:35:43 -05:00
Charlie Savage
b2bd6b221c FindRuby: Enclose Ruby executable in quotes 2026-01-23 10:35:43 -05:00
Charlie Savage
752d5cace6 FindRuby: Fix incorrect code and versions 2026-01-23 10:35:42 -05:00
Charlie Savage
deb67fa837 FindRuby: Remove duplicate word 2026-01-23 10:35:42 -05:00
Charlie Savage
dba840934c FindRuby: Add Ruby 4.0 support 2026-01-23 10:35:42 -05:00
Charlie Savage
56b3437108 FindRuby: Fix finding headers on Github MacOS runners using Brew 2026-01-23 10:35:42 -05:00
Paulius Velesko
47c3e55d4a HIP: Add support for SPIR-V platform
Add `spirv` as a known value for `CMAKE_HIP_PLATFORM`.
Default `CMAKE_HIP_ARCHITECTURES` to `OFF` for `spirv`.

Fixes: #27410
2026-01-20 13:18:18 -05:00
Brad King
18c98682f5 Merge topic 'verify-private-header-sets'
b61637f90f File sets: Add verification of private file sets
61df2e15a2 Help: Verification target also sets CXX_SCAN_FOR_MODULES to false
909b54023a File sets: Specify verify file set target names in one place
20219414c3 File sets: Always verify interface files sets of executable targets
c7a1d5ee58 Tests: Rename VerifyHeaderSets tests to VerifyInterfaceHeaderSets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11565
2026-01-19 09:27:59 -05:00
Craig Scott
b61637f90f File sets: Add verification of private file sets
Add support for PRIVATE header sets, analogous to the existing
INTERFACE header sets support. A key difference between the two is
the way they handle build and usage requirements. INTERFACE
header sets rely on the original target's INTERFACE, whereas PRIVATE
header sets copy across various properties from the original target.

Generated files need special handling for PRIVATE header sets.
Add a dependency on the original target to the verification target to
ensure such generated files will exist.

Fixes: #23448
2026-01-16 18:10:17 +11:00
Brad King
6347854fa2 Merge topic 'botantony-find-lua-5.5'
261b7b933c FindLua: Add support for Lua 5.5

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11550
2026-01-13 10:49:22 -05:00
Anton Melnikov
261b7b933c FindLua: Add support for Lua 5.5
Fixes: #27476

Co-authored-by: Tyler Yankee <tyler.yankee@kitware.com>
2026-01-12 16:02:29 -05:00
Kyle Edwards
2d2036c9e9 FindCUDAToolkit: Add CUDA::bin2c target 2026-01-12 12:02:07 -05:00
Brad King
538926c532 Merge topic 'cpack-archive-compression-level'
0bca70968a CPack: support archive compression level
54f926c740 libarchive: Limit lzma compression level to 6 on AIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11548
2026-01-12 09:40:51 -05:00