Commit Graph

70808 Commits

Author SHA1 Message Date
Peter Kokot c5980ad868 Check*SourceRuns: Update documentation
This updates the following modules:
- CheckCSourceRuns
- CheckCXXSourceRuns
- CheckFortranSourceRuns
- CheckOBJCSourceRuns
- CheckOBJCXXSourceRuns
- CheckSourceRuns

Changes:
- Added intro code blocks showing how to include these modules.
- Used word "command" instead of "macro".
- Added "Commands" sections to have a clearer overview of the modules at
  first encounter.
- Reworded commands descriptions and arguments a bit.
- Added a rubric title for variables that affect the checks.
- Added "Examples" sections.
- Added "See Also" sections.
- Added few more examples in the CheckSourceRuns module to show how to
  use this module with different languages, `CMAKE_REQUIRED_*` variables,
  and mentioned bracket argument syntax a bit.
2025-05-26 00:27:52 +02:00
Kitware Robot cfcff29087 CMake Nightly Date Stamp 2025-05-25 00:04:42 -04:00
Brad King f8cc68d282 Merge topic 'wix-include-build-dir'
900897b510 CPack/WiX: Add the build directory to IncludeSearchPaths for wix.exe
a86eaf98f7 CPack/WiX: Restore condition for passing build directory to candle search path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10816
2025-05-24 07:15:35 -04:00
Brad King a2f22d6a56 Merge topic 'stdio-streams'
fb3e7825f3 StdIo: Restore Windows Console I/O modes on exit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !10817
2025-05-24 07:14:09 -04:00
Kitware Robot 78ce5b4fee CMake Nightly Date Stamp 2025-05-24 00:04:47 -04:00
Brad King fb3e7825f3 StdIo: Restore Windows Console I/O modes on exit
The Windows documentation [1] states:

> command-line applications should capture the initial console
> mode at startup and attempt to restore it when exiting

We set `ENABLE_VIRTUAL_TERMINAL_{INPUT,PROCESSING}` modes since
commit d6a1ff59f1 (StdIo: Provide metadata about stdin, stdout,
stderr streams, 2025-05-06).  Avoid leaking them.

[1] https://learn.microsoft.com/en-us/windows/console/console-modes

Issue: #26924
2025-05-23 10:35:47 -04:00
Julian Greilich 900897b510 CPack/WiX: Add the build directory to IncludeSearchPaths for wix.exe
In commit f2134169f6 (WiX: Add the build directory to IncludeSearchPaths
for candle.exe, 2018-07-06, v3.13.0-rc1~318^2) we implemented this for
WiX v3 with `candle.exe`.  Use the same mechanism for Wix v4 and upwards
for `wix.exe`.
2025-05-23 08:41:13 -04:00
Julian Greilich a86eaf98f7 CPack/WiX: Restore condition for passing build directory to candle search path
Refactoring in commit 48adc29721 (replace "std::string::find(x) == 0"
with cmHasPrefix(), 2020-03-20, v3.18.0-rc1~488^2~7) accidentally
changed `std::string::rfind(x, 0) != 0` to `!cmHasSuffix()` instead of
`!cmHasPrefix()`.

This is currently not an big issue, but leads to the build directory
being included even when no source file outside the build directory is
used in the project.
2025-05-23 08:40:44 -04:00
Brad King 12d8baadab Merge topic 'ctest-color-windows'
0b61a17c93 ctest: Enable color output on Windows Consoles supporting VT100 escapes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10813
2025-05-23 08:30:16 -04:00
Brad King c834f85ab0 Merge topic 'ctest-submit-cleanup'
afd6c2966e cmCTestSubmitHandler: Move internal helpers to anonymous namespace
78f0b2aeed cmCTestSubmitHandler: Make internal method private
2a9cfc2da3 cmCTestSubmitHandler: Remove unnecessary type alias
8f698e1708 cmCTestSubmitHandler: Open log file earlier
7475921ff8 cmCTestSubmitHandler: Inline and remove method called only once

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10815
2025-05-23 08:28:32 -04:00
Brad King ccec689b66 Merge topic 'patch-CheckLibraryExists'
157c97306f CheckLibraryExists: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10814
2025-05-23 08:27:27 -04:00
Brad King 323b24073c Merge topic 'patch-CheckFunctionExists'
08ae40fabf CheckFunctionExists, CheckFortranFunctionExists: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10811
2025-05-23 08:25:06 -04:00
Brad King 2bd60d2d2f Merge topic 'swift-module-nested-structure'
1711e86d6c Swift: Generate nested swift modules in build dir
b36175abdb Swift: Detect module triple from compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10664
2025-05-23 08:23:28 -04:00
Kitware Robot c9e1731416 CMake Nightly Date Stamp 2025-05-23 00:04:35 -04:00
Brad King afd6c2966e cmCTestSubmitHandler: Move internal helpers to anonymous namespace 2025-05-22 14:30:38 -04:00
Brad King 78f0b2aeed cmCTestSubmitHandler: Make internal method private 2025-05-22 14:30:38 -04:00
Brad King 2a9cfc2da3 cmCTestSubmitHandler: Remove unnecessary type alias 2025-05-22 14:30:37 -04:00
Brad King 8f698e1708 cmCTestSubmitHandler: Open log file earlier 2025-05-22 14:30:37 -04:00
Brad King 7475921ff8 cmCTestSubmitHandler: Inline and remove method called only once 2025-05-22 14:30:37 -04:00
Peter Kokot 157c97306f CheckLibraryExists: Update documentation
- Added intro code block showing how to include this module.
- Used "command" instead of "macro".
- Added rubric title for variables that affect the check command.
- Refactored note about using CheckSymbolExists as a more robust check.
2025-05-22 19:16:48 +02:00
Brad King 0b61a17c93 ctest: Enable color output on Windows Consoles supporting VT100 escapes
Extend commit ffdec37a19 (CTest: Add colored output on tests summary
where supported, 2018-11-07, v3.14.0-rc1~384^2) to enable color on
Windows.

Issue: #26924
2025-05-22 13:12:41 -04:00
Brad King 6be0c6d26a Merge topic 'astgrep-cmstrcat'
557c44b93e cmStrCat: use character literals where possible
23779057fd cmStrCat: combine neighboring arguments where possible
483d13daf4 ast-grep: add a rule to turn strings into characters
61743471d9 ast-grep: add a rule to find adjacent string literals in cmStrCat calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10790
2025-05-22 08:47:15 -04:00
Brad King 80282f57a9 Merge topic 'windows-export-no-operators'
607d9cf561 WINDOWS_EXPORT_ALL_SYMBOLS: Do not export C++ operators declared extern "C"
8f8b2e9429 bindexplib: Truncate short symbol names on first embedded null-terminator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10791
2025-05-22 08:31:38 -04:00
Brad King 1934095e7b Merge topic 'patch-CheckVariableExists'
62c121163d CheckVariableExists: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10809
2025-05-22 08:28:46 -04:00
Brad King 863ba7c207 Merge topic 'patch-CheckTypeSize'
1afdd98ca3 CheckTypeSize: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10808
2025-05-22 08:26:54 -04:00
Brad King a792b23752 Merge topic 'patch-CheckLinkerFlag'
4b0bce12c8 CheckLinkerFlag: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10807
2025-05-22 08:24:15 -04:00
Brad King 0f0b3edfa6 Merge topic 'ci-intel-windows'
63c3e1fd3b ci: Shorten name of job testing Intel 2021.9 compilers on Windows
ebeee21983 ci: Update to IntelLLVM 2025.1 on Windows
3bce19c653 ci: Add script to repackage Intel oneAPI compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10810
2025-05-22 08:18:33 -04:00
Kitware Robot 7ffdcb1036 CMake Nightly Date Stamp 2025-05-22 00:04:25 -04:00
Peter Kokot 08ae40fabf CheckFunctionExists, CheckFortranFunctionExists: Update documentation
Changes:
- Added intro code blocks showing how to include these modules.
- Used "command" instead of "macro".
- Added some basic examples sections.
- Added a rubric title for variables that affect the checks.
- Synced and reworded descriptions.
- Added "See Also" sections.
2025-05-22 00:07:42 +02:00
Brad King 63c3e1fd3b ci: Shorten name of job testing Intel 2021.9 compilers on Windows
We do not need to test more than one patch level.
2025-05-21 16:47:03 -04:00
Brad King ebeee21983 ci: Update to IntelLLVM 2025.1 on Windows 2025-05-21 16:34:41 -04:00
Brad King 3bce19c653 ci: Add script to repackage Intel oneAPI compilers
Intel compilers for Windows are provided only via installer executables.
Add a script to repackage the parts we need for CMake's CI jobs.
2025-05-21 15:33:34 -04:00
Evan Wilde 1711e86d6c Swift: Generate nested swift modules in build dir
The nested Swift module structure is recommended for Swift projects.
This structure has an outer directory called
`<Swift_MODULE_NAME>.swiftmodule` that contains generated files for the
interface. The binary swift modules, textual swift interface, and other
supplemental outputs that make up the interface to a Swift library all
go in this outer directory with the Swift module triple as the filename
followed by the appropriate file extension based on what that file
contains.

Issue: #19284
2025-05-21 10:19:58 -07:00
Brad King fc9e9d1196 Merge topic 'automoc-specific-include-dirs'
39677f4cc6 AUTOMOC: Add option to specify moc include directories explicitly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Osyotr <zhenchik35026@gmail.com>
Merge-request: !10640
2025-05-21 08:46:35 -04:00
Brad King 147aa22522 Merge topic 'resolve_hip_host_compiler_abs_path'
b2425fdffd HIP: Store CMAKE_HIP_HOST_COMPILER as an absolute path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10803
2025-05-21 08:44:22 -04:00
Brad King 76f341d374 Merge topic 'cuda-host-compiler-abs-path'
fdb8f0f588 CUDA: Store CMAKE_CUDA_HOST_COMPILER as an absolute path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10799
2025-05-21 08:35:49 -04:00
Brad King bb10fb3990 Merge topic 'patch-CheckSymbolExists'
58e8999c28 CheckSymbolExists, CheckCXXSymbolExists: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10804
2025-05-21 08:33:36 -04:00
Brad King e91b0fd0c3 Merge topic 'stdio-no-color'
6aa604ef10 StdIo: Honor NO_COLOR environment variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10805
2025-05-21 08:28:54 -04:00
Brad King d249540a7e Merge topic 'ci-intel-compiler'
351169af23 gitlab-ci: add job testing Intel oneAPI 2025.1.0 compilers on Linux
a56adbdd60 gitlab-ci: add job testing Intel oneAPI 2025.0.0 compilers on Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10806
2025-05-21 08:26:36 -04:00
Brad King 6d13f60313 Merge branch 'release-4.0' 2025-05-21 08:25:14 -04:00
Brad King 835c556b91 Merge branch 'release-3.31' 2025-05-21 08:25:08 -04:00
Brad King 6cf75233b1 Merge branch 'release-3.31' into release-4.0 2025-05-21 08:24:51 -04:00
Brad King 6110426ca7 Merge branch 'release-4.0' 2025-05-21 08:24:05 -04:00
Brad King 3955e9b614 Merge topic 'ci-msvc-14.44'
e37a40442a ci: Update Windows builds to MSVC 14.44 toolset
c955d5c31f ci: Tie Intel 2024.1 jobs on Windows to MSVC 14.43 toolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10802
2025-05-21 08:24:05 -04:00
Brad King 81c7ed367c Merge topic 'ci-msvc-14.44' into release-4.0
e37a40442a ci: Update Windows builds to MSVC 14.44 toolset
c955d5c31f ci: Tie Intel 2024.1 jobs on Windows to MSVC 14.43 toolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10802
2025-05-21 08:24:03 -04:00
Brad King 7ffb1364ea Merge topic 'ci-msvc-14.44' into release-3.31
e37a40442a ci: Update Windows builds to MSVC 14.44 toolset
c955d5c31f ci: Tie Intel 2024.1 jobs on Windows to MSVC 14.43 toolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10802
2025-05-21 08:21:01 -04:00
Tolga Mizrak 607d9cf561 WINDOWS_EXPORT_ALL_SYMBOLS: Do not export C++ operators declared extern "C"
The pattern `extern "C" { inline bool operator==(...) {} }` appears
in at least one Windows SDK header, `winnt.h`.  Translation units that
instantiate the inline symbol produce object files with a symbol named
just `==`.  Avoid exporting such symbols because the linker will not
recognize them.

Fixes: #24999
2025-05-21 08:07:54 -04:00
Kitware Robot 4762f99954 CMake Nightly Date Stamp 2025-05-21 00:04:36 -04:00
Peter Kokot 62c121163d CheckVariableExists: Update documentation
- Added intro code block showing how to include this module.
- Added examples section.
- Added missing CMAKE_REQUIRED_LINK_DIRECTORIES variable (this module
  can also use it as of CMake 3.31).
- Added a note that this is a linker only check and it doesn't check
  whether the variable is also declared in headers, unlike
  check_symbol_exists().
- Added "See Also" section.
2025-05-21 00:41:47 +02:00
Peter Kokot 1afdd98ca3 CheckTypeSize: Update documentation
- Added intro code block showing how to include this module.
- Used "command" instead of "macro".
- Described the command arguments in a list separately.
- Refactored some descriptions.
- Added a rubric title for variables that affect the check.
2025-05-20 23:35:18 +02:00