Commit Graph
309 Commits
Author SHA1 Message Date
scivision 7406f0be82 Modules: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL
Capture `execute_process` calls' `RESULT_VARIABLE`.

We don't actually need to check the result as we presume the existing
logic is already adequate, and sometimes programs return non-zero values
as result of valid query.  I.e. this is a "safe" way to broadly protect
these scripts.

Issue: #27782
2026-05-07 13:36:36 -04:00
Brad King 57a1945745 Merge topic 'exe-check'
8d48d755f0 Tests: Add missing execute_process result checks
a1b5c0da87 Modules: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL
6b4432bc10 FindGit: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12011
2026-05-07 08:07:07 -04:00
scivision a1b5c0da87 Modules: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL
Capture the `execute_process` command's `RESULT_VARIABLE`.

Issue: #27782
2026-05-06 11:16:36 -04:00
Ben Boeckel 2e549c1df4 CMakeDetermineLinkerId: support the OpenWatcom linker ID 2026-05-05 12:24:59 -04:00
Brad King 811bf8fb89 Merge topic 'LINKER_TYPE-wild'
e96c5ba13d Add the support of the wild linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11966
2026-04-24 09:16:32 -04:00
Marc Chevrier e96c5ba13d Add the support of the wild linker
Fixes: #27755
2026-04-23 16:21:30 +02:00
Brad KingandSerguei E. Leontiev a95fae2d36 PellesC: Add support for ASM_POASM language assembler
The Pelles C compiler does not support ASM, and the `poasm` assembler
uses a distinct syntax.  Add a dedicated language as we do for similar
cases from other vendors.  Leave documentation commented out for now
because the PellesC toolchain support in general is not yet documented.

Fixes: #27758
Issue: #21536
Co-authored-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-04-22 14:42:00 -04:00
Brad King 0afca0c1e0 Merge topic 'CPACK_RPM_SPEC_MORE_DEFINE-list2string'
30aa150c25 CPack/RPM: `CPACK_RPM_SPEC_MORE_DEFINE` could be a list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11899
2026-04-14 09:53:55 -04:00
Ben Boeckel 80abf737cc Modules: use find_*(NO_CACHE)
Avoid manual cache management logic.
2026-04-12 08:02:28 -04:00
Alex Turbov 30aa150c25 CPack/RPM: CPACK_RPM_SPEC_MORE_DEFINE could be a list
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2026-04-12 05:54:58 +04:00
Alex Turbov 1f939db3c4 CPack/RPM: Remove superfluous %clean section from generated spec file
According to [this] commit message in the `rpmlint` codebase,
a %clean section is not necessary since `rpm` 4.8.0 (2010)
and nowadays `rpmlint` at least issues a warning about it, and
(seems) in some distros it's even considered as an error.

[this]: https://github.com/rpm-software-management/rpmlint/commit/b1a8a422
2026-03-08 03:52:21 +04:00
Alex Turbov 302a645d73 CPack/DEB: use triggers instead of legacy postXXX scripts for ldconfig 2026-03-05 23:14:10 +04:00
Alex Turbov f461382d42 CPack/DEB: rename variable w/ result of dpkg find to match other vars 2026-03-05 22:07:58 +04:00
Alex Turbov 8a8bceda98 CPack/DEB: rename internal variable 2026-03-05 22:06:12 +04:00
Alex Turbov 430eb26511 CPack/DEB: modernize parent scope variables pass 2026-03-04 21:29:45 +04:00
Alex Turbov 165889e7d2 CPack/DEB: refactor some functions to check for errors+exit earlier
… and deindent the rest of the function body.
2026-03-04 21:29:45 +04:00
Alex Turbov ed04dda2a2 CPack/DEB: wrap too long lines 2026-03-04 21:29:45 +04:00
Alex Turbov 6978f9591c CPack/DEB: remove redundant quotes and variable expansions 2026-03-04 21:29:44 +04:00
Alex Turbov 4c889716fa CPack/DEB: modernize filesystem operations 2026-03-04 20:31:50 +04:00
Alex Turbov 963a022782 CPack/RPM: wrap some too long lines 2026-03-03 21:42:47 +04:00
Alex Turbov 17a39084c2 CPack/RPM: some other simplifications 2026-03-03 21:42:47 +04:00
Alex Turbov 0966151c73 CPack/RPM: modernize file and path operations 2026-03-03 21:42:47 +04:00
Alex Turbov 16407d6934 CPack/RPM: escape regex in the modern way 2026-03-03 21:42:46 +04:00
Alex Turbov 9ed6106a27 CPack/RPM: remove redundant quotes and variable expansions 2026-03-03 21:42:38 +04:00
Alex Turbov d7701b758b CPack/RPM: use list transform instead of string manipulations 2026-03-03 21:41:52 +04:00
Alex Turbov fd321c02c5 CPack/RPM: ls -la execution + parse → file(READ_SYMLINK) 2026-03-03 21:41:52 +04:00
Alex Turbov 8549727ff4 CPack/RPM: use the modern return(PROPAGATE…) 2026-03-03 21:41:52 +04:00
Alex Turbov 2fe2665541 CPack/RPM: execute stat to get permissions instead of ls -l
Ask `stat` to output only human-readable permissions and nothing else.
Secondly, simplify parsing algorithm. Instead of multiple regex matches
transform permissions into a list and split into groups.
2026-03-03 21:41:52 +04:00
Alex Turbov 6445447692 CPack/RPM: modernize foreach calls to use IN LISTS/ITEMS 2026-02-28 02:27:38 +04: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
Tyler YankeeandBrad King 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
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
AJIOB 0bca70968a CPack: support archive compression level
Fixes: #18117
2026-01-09 10:35:04 -05:00
Brad King 12be5c60ff Merge topic 'cpack-stgz-deref-symlinks'
ecbe5a8479 CPack/STGZ: Avoid replacing directory symlinks if possible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11526
2025-12-18 10:37:58 -05:00
Brad King ecbe5a8479 CPack/STGZ: Avoid replacing directory symlinks if possible
When installing into a prefix with existing directory symlinks, tell
`tar` not to replace them with real directories from the package.

Fixes: #21119
2025-12-17 17:33:23 -05:00
Kevin Barre 07fe3f95ce CPack/DEB: Add CPACK_DEBIAN_COMPRESSION_LEVEL variable
Add a new variable `CPACK_DEBIAN_COMPRESSION_LEVEL` to control the compression
level used when generating Debian packages. This complements the existing
`CPACK_DEBIAN_COMPRESSION_TYPE` variable and allows finer control over the
compression performance vs. size trade-off. Supported values correspond to
the compression level accepted by the underlying compressor (e.g. gzip, xz,
zstd, etc.).
2025-12-17 14:27:10 -05:00
Brad King 5ec87b2ba7 Emscripten: Provide CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID
Extend commit 96d9b94a98 (Emscripten: Add platform modules, 2025-05-16,
v4.2.0-rc1~607^2~3) to account for commit 7f0f382c55 (Provide
CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID on more compilers, 2025-03-24,
v4.1.0-rc1~499^2).

Fixes: #27425
2025-11-25 15:46:16 -05:00
Alex Turbov 2ca11db2e3 pre-commit: version bump typos hook plus fix found typos
Backport commit 8de02a14c8 (ci(pre-commit): version bump `typos` hook
plus fix found typos, 2025-10-23) to the CMake 4.2 release branch.
2025-10-30 17:43:16 -04:00
Tristan Daifuku 69e2f3f8ea Linker: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL set to ANY
Tolerate expected failures of linkers invoked via `execute_process`.
2025-10-20 11:58:46 -04:00
Daniel Pfeifer 3c7fee0d99 CPack/NSIS: Allow setting CRCCheck
Fixes: #27260
2025-09-24 19:30:27 +02:00
Nils Gladitz 193f17102f CPack/WiX: Implement opt-in per component .cab
By setting CPACK_WIX_CAB_PER_COMPONENT users can generate one
.cab per component instead of one .cab per installer.

WiX compresses .cab files in parallel.
This may potentially speed up installer creation.

May also allow larger installers (there is a 2GB per .cab limit).
2025-09-10 12:24:42 +02:00
Brad King 993794f5f6 CheckCompilerFlag: Avoid matching parts of multiple messages
Diagnostic messages for unsupported flags appear on a single line.
Do not accidentally match unrelated messages across multiple lines.

Fixes: #27156
2025-09-08 11:16:09 -04:00
Brad King c196e024bd CheckCompilerFlag: Improve layout of message regex tables 2025-09-08 11:14:41 -04:00
Brad King 36673385bb CUDA: Improve error message when CMAKE_CUDA_ARCHITECTURES contains quotes
Closes: #27150
2025-08-20 10:47:02 -04:00
Verney7 cfbf0480ff Sunway: Add sw_64 support
``sw_64`` is a new RISC ISA, which is a bit like RISC-V.
2025-08-07 09:42:11 -04:00
Brad King 72ee13035d Merge topic 'cuda_13_support'
3ff777de12 CUDA: Update CUDA tests to handle CUDA 13 deprecations
bbf732525a CUDA: Add CUDA 13.0 support to 'all' and 'all-major' architecture tables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11015
2025-08-05 09:58:01 -04:00
Brad King 91a94392b5 Merge topic 'cuda_ensure_arch_order'
8beb309b79 CUDA: Make sure CUDA architectures are in order

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11014
2025-08-05 09:55:48 -04:00
Robert Maynard bbf732525a CUDA: Add CUDA 13.0 support to 'all' and 'all-major' architecture tables 2025-08-04 11:22:12 -04:00
Robert Maynard 8beb309b79 CUDA: Make sure CUDA architectures are in order
Make sure we always group major versions together instead
of interleaving 100 and 120 families.
2025-08-04 11:06:45 -04:00
Brad King 1824b771e9 Merge topic 'cpack-nuget-symbol-package'
e71396c8db CPack/NuGet: Enable the generation of NuGet symbol package(s)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10852
2025-06-06 08:22:00 -04:00