Commit Graph

14853 Commits

Author SHA1 Message Date
AJIOB
2b2344b412 MSVC: Add abstraction for runtime checks
Replace our hard-coded default for `/RTC1` with a first-class
abstraction to select runtime checks from an enumeration of logical
names.  Add a `MSVC_RUNTIME_CHECKS` target property and corresponding
`CMAKE_MSVC_RUNTIME_CHECKS` variable.

Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose
runtime checks under the old behavior.  Add policy CMP0184 to
provide compatibility.

Fixes: #26614
2025-01-29 13:07:41 -05:00
Brad King
ec7cc80370 Merge topic 'patch-lower-case-style'
4e6a13f211 Use lower case style for commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !10245
2025-01-29 11:37:51 -05:00
Brad King
e509c0a423 Merge topic 'patch-else'
9f2efc3270 Remove optional arguments from else() and end*() commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !10243
2025-01-29 11:35:30 -05:00
Brad King
fbb69f867c Merge topic 'FindCURL-version-var'
d039da1c24 FindCURL: Add CURL_VERSION variable to match upstream cmake package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10250
2025-01-29 11:32:39 -05:00
Brad King
377707d271 Merge topic 'rbenv_support'
ef2c3ca828 FindRuby: Add rbenv support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10100
2025-01-29 11:31:09 -05:00
Mathieu Flament
1995557885 FindPython : fix a misspelled variable name in __python_import_library macro.
As a result, the IMPORTED_LOCATION_RELEASE property of the SABIModule target was empty, instead of pointing to the Python runtime library for the Stable Application Binary Interface.
2025-01-29 01:09:17 +01:00
Peter Kokot
4e6a13f211 Use lower case style for commands
Where possible this syncs the CS for command names:

- check_c_source_compiles()
- check_cxx_compiler_flag()
- check_cxx_source_compiles()
- check_cxx_symbol_exists()
- check_include_file_cxx()
- check_include_file()
- check_include_files()
- check_library_exists()
- check_source_compiles()
- check_struct_has_member()
- check_symbol_exists()
- check_type_size()
- cmake_dependent_option()
- cmake_parse_arguments()
- feature_summary()
- file()
- find_package_handle_standard_args()
- if(), endif...
- install(FILES)
- list()
- message()
- pkg_check_modules()
- select_library_configurations()
- set_package_info()
- test_big_endian()
2025-01-28 13:51:46 -05:00
Brad King
d039da1c24 FindCURL: Add CURL_VERSION variable to match upstream cmake package
`find_package(CURL CONFIG)` provides `CURL_VERSION` from the upstream
cmake package version file.

Upstream curl commit `699ac9430c` (cmake: publish/check supported
protocols/features via `CURLConfig.cmake`, 2024-12-29) extends the
upstream cmake package to provide our old `CURL_VERSION_STRING`.
Provide both names from CMake's own module to aid transition.

Fixes: #26634
2025-01-28 09:52:22 -05:00
Peter Kokot
3209f2b0e7
BundleUtilities: Update documentation
* Updated warnings at the top to a note
* The provided functions are described as titled items and have code
  blocks added
* Added missing documentation for the `get_item_rpaths()` function
* Added `IGNORE_ITEM` option to relevant signatures
2025-01-28 15:45:47 +01:00
Brad King
00471550de Merge topic 'GoogleTest-variable-expansion'
c7884ceefa GoogleTest: Restore support for spaces in explicit WORKING_DIRECTORY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10192
2025-01-28 08:42:28 -05:00
Peter Kokot
9f2efc3270
Remove optional arguments from else() and end*() commands
This adds a brief explanation of the optional condition in the `else()`
and removes all legacy usages of `else()` and `end*()` commands.
2025-01-28 03:01:23 +01:00
cfis
ef2c3ca828 FindRuby: Add rbenv support 2025-01-27 20:36:06 -05:00
Ihor Sofiichenko
c7884ceefa GoogleTest: Restore support for spaces in explicit WORKING_DIRECTORY
Revise commit fc7aa3cd69 (tests: Preserve empty arguments in test
command lines, 2024-09-30, v3.31.0-rc1~33^2) to delay variable expansion
until code evaluation.  Otherwise we may parse the working directory
path as CMake language code.
2025-01-27 12:04:41 -05:00
Brad King
084f6055a8 Merge topic 'patch-CMAKE_OBJDUMP'
dc7aabf4d0 Help: Document CMAKE_OBJDUMP variable
4bd3519e89 CPack: Avoid mentioning internal CMake module in documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10224
2025-01-27 10:30:58 -05:00
Marc Chevrier
3d2709c1ae Linker configuration: rely now on CMAKE_<LANG>_LINK_MODE variable.
CMake now provides the CMAKE_<LANG>_LINK_MODE variable which specify how
the link step is done. So, the CMAKE_<LANG>_USING_LINKER_MODE variable
is no longer needed.
2025-01-26 14:45:21 +01:00
Marc Chevrier
0ba67171d9 Extend CMAKE_<LANG>_LINK_MODE support
* Add CMAKE_Swift_LINK_MODE
* Ensure correct definition for various clang usages on Windows
2025-01-26 14:45:21 +01:00
Peter Kokot
dc7aabf4d0 Help: Document CMAKE_OBJDUMP variable 2025-01-24 10:43:18 -05:00
Brad King
4bd3519e89 CPack: Avoid mentioning internal CMake module in documentation 2025-01-24 10:43:00 -05:00
Brad King
7210f2d8c3 Merge topic 'patch-load-cache-find-modules'
676b6d4574 FindFLTK*: Fix the load_cache() signature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10220
2025-01-24 10:02:22 -05:00
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
2025-01-23 13:09:50 -05:00
Kitware Robot
b2ba64add9 Revise C++ coding style using clang-format-18
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Fixes: #26123
2025-01-23 11:43:06 -05:00
Brad King
1d4d4362d9 Merge topic 'remove-old-compatibility'
77f71ad4e2 Remove compatibility with CMake versions older than 3.5
fb1bd1d330 CMP0065: Remove support for OLD behavior
d9dd38cccf CMP0064: Remove support for OLD behavior
d88047c329 Remove compatibility with CMake versions older than 3.3
ac1a9cb160 CMP0063: Remove support for OLD behavior
36fffb673a CMP0062: Remove support for OLD behavior
789a7d73d4 CMP0061: Remove support for OLD behavior
3dc19e24cb CMP0060: Remove support for OLD behavior
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10210
2025-01-23 09:36:59 -05:00
Brad King
63924c4afa Merge topic 'ci-typos'
c3777c1536 ci: Extend spellcheck job with 'typos' tool
d11552c2d9 codespell: Exclude paths by patterns following pre-commit check conventions
11d0a631d4 codespell: Split multi-valued configuration across multiple lines
54dfadaf5a ci: Rename "codespell" job to more general name "spellcheck"
17fc94e5e3 ci: Add typos 1.29.4 to Fedora base image
ddf8220572 ci: Use Fedora 41 default flang package now that it is new enough
1e2d19ea4f gitignore: Tell tools honoring .gitignore to ignore .git too
0d0a94bcfb Tests: Fix Fortran syntax for initialized variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10211
2025-01-23 09:34:02 -05:00
Peter Kokot
676b6d4574
FindFLTK*: Fix the load_cache() signature
The load_cache(READ_WITH_PREFIX) command requires specifying one prefix
and the rest of the arguments are the cache entry names.
2025-01-22 23:43:39 +01:00
Peter Kokot
f416449664
CheckCXXCompilerFlag: Fix typo in argument 2025-01-22 18:24:13 +01:00
Brad King
fb1bd1d330 CMP0065: Remove support for OLD behavior 2025-01-22 10:40:55 -05:00
Brad King
c283aafe62 CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
Brad King
76155c2ce6 Merge topic 'iar-find-linker'
cd9dd4cf8e IAR: decouple linker location from toolkit's bin dir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10201
2025-01-22 09:28:12 -05:00
Brad King
9a3ecf15ab Merge topic 'tasking-std-flags'
c0972d2c81 Tasking: Drop extensions from C and CXX standard level flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Josef Angstenberger <code@jtxa.de>
Merge-request: !10208
2025-01-22 09:26:21 -05:00
Brad King
cf6114886a Merge topic 'CMAKE_LANG_DEVICE_LINK_MODE'
53de9d0125 Introduce CMAKE_<LANG>_DEVICE_LINK_MODE variable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10209
2025-01-22 09:24:27 -05:00
Alex Turbov
c3777c1536 ci: Extend spellcheck job with 'typos' tool
Unlike the `codespell`, `typos` is capable of finding typos
in combined identifiers (`CamelCase` or `snake_case`).
2025-01-22 08:51:45 -05:00
Felipe Torrezan
cd9dd4cf8e IAR: decouple linker location from toolkit's bin dir
The implementation in commit 564d527c04 (IAR: Improve error message for
missing license, 2024-08-12, v3.31.0-rc1~234^2) failed for corner cases
in which symlinks were used from a location different from the one in
which the toolkit is shipped with (`<target>/bin`).

In this new implementation, the `<target>` architecture is taken solely
from the compiler NAME itself for all the supported languages and
forwarded to its respective BinUtils executable names
(e.g., `icc<target>`, `iasm<target>`, `a<target>`). This decouples the
location from the subdirectory in which they should be found.

Fixes: #26610
2025-01-21 19:21:06 +01:00
Alaa Mahran
c0972d2c81 Tasking: Drop extensions from C and CXX standard level flags
Tasking compiler extensions and language standard flags are not tied
together as they are with gcc/clang.  Since CMake does not model
granular abstractions for extensions, leave individual extension flags
to the project or user.

Fixes: #26591
2025-01-21 09:59:05 -05:00
Brad King
cbe7fc4b81 CMP0056: Remove support for OLD behavior 2025-01-21 09:44:05 -05:00
Brad King
7a39d926e8 Merge topic 'remove-old-compatibility'
381c446ff7 VS: Remove support for appending a platform to the generator name
dc24d88062 Remove compatibility with CMake versions older than 3.1
90d814f024 CMP0054: Remove support for OLD behavior
292aaffb78 Source: Remove unused cmCommandArgument{Lexer,Parser}
1150fae89a CMP0053: Remove support for OLD behavior
f0b1ca4d70 CMP0052: Remove support for OLD behavior
e4fddc8e37 CMP0051: Remove support for OLD behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10205
2025-01-21 09:43:10 -05:00
Brad King
f8bf7fb546 Merge topic 'findx11-add-xpresent'
f2873fcf98 FindX11: Add missing Xpresent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10200
2025-01-21 09:41:06 -05:00
Brad King
477292e7ad Merge topic 'patch-CMakePrintHelpers'
fb4d5f34fd CMakePrintHelpers: Enhance documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10194
2025-01-21 09:38:49 -05:00
Brad King
f5ea1f099a Merge topic 'patch-check-prototype-definition'
b4c418660f CheckPrototypeDefinition: Enhance documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10196
2025-01-21 09:37:25 -05:00
Brad King
f53b9e1d39 Merge topic 'patch-CMakePushCheckState-include-guard'
0348ae1a41 CMakePushCheckState: Add include_guard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10190
2025-01-21 09:35:45 -05:00
Brad King
a571173076 Merge topic 'ep-colon-in-path'
b1ff216656 ExternalProject: Preserve colons and semicolons in the path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10197
2025-01-21 09:22:22 -05:00
Marc Chevrier
53de9d0125 Introduce CMAKE_<LANG>_DEVICE_LINK_MODE variable.
This is a complement to commit 00932ea864 (Introduce CMAKE_<LANG>_LINK_MODE variable., 2025-01-09)
2025-01-21 15:17:05 +01:00
Brad King
50eebed6ed Merge topic 'tasking-asm'
fc163f9e43 Tasking: Add support for ASM through the cctc compiler driver
942f0d119b Tasking: Add identification for the tasking assembler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10163
2025-01-20 10:03:00 -05:00
Brad King
90d814f024 CMP0054: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
Brad King
1150fae89a CMP0053: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
Komasan Zura
f2873fcf98 FindX11: Add missing Xpresent
The Xlib interface to the Xpresent extension was missing from the FindX11 module, so I put it in. The xcb interface is already present.
Xpresent project page: https://gitlab.freedesktop.org/xorg/lib/libxpresent
2025-01-19 23:08:03 -05:00
Brad King
796cf2d8eb CMP0025: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
Craig Scott
b1ff216656
ExternalProject: Preserve colons and semicolons in the path
The _ep_set_directories() function needs to ensure paths passed in
are in the expected CMake path form. The special character that
file(TO_CMAKE_PATH) interprets as a path separator must be
masked to prevent it splitting paths that contain that character
(semicolons on Windows, colons on other platforms).

Fixes: #26490
2025-01-19 22:43:59 +11:00
Peter Kokot
b4c418660f
CheckPrototypeDefinition: Enhance documentation
- Function arguments explained in paragraphs
- A simplified pseudocode illustration added to better understand the
  check under the hood
- Usage example added to the bottom
2025-01-19 11:43:06 +01:00
Brad King
094b42b643 CMP0020: Remove support for OLD behavior 2025-01-18 09:51:44 -05:00
Brad King
8ef1b4001b Merge topic 'remove-old-compatibility'
785523a136 Remove compatibility with CMake versions older than 2.8.0
35282387ea CMP0014: Remove support for OLD behavior
fad9c55b8b CMP0013: Remove support for OLD behavior
98a59ba8ad CMP0012: Remove support for OLD behavior
3c0dbb66f5 CMP0011: Remove support for OLD behavior
cf832e75bc CMP0010: Remove support for OLD behavior
77f8c374f3 CMP0009: Remove support for OLD behavior
43ef139567 CMP0008: Remove support for OLD behavior
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10188
2025-01-18 09:50:27 -05:00
Brad King
e838fc5087 Merge topic 'FindRuby-use-validator'
61c3718a00 FindRuby: Use find_program VALIDATOR
e891159657 FindRuby: Clarify search process comments and conditions
9f0b3e90b6 FindRuby: Remove unused variable
e184dda2da FindRuby: Query Ruby_EXECUTABLE again if it changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10167
2025-01-18 09:43:19 -05:00
Brad King
a38d51bf3f Merge topic 'CheckIPOSupported-doc-cuda'
2048b60f53 CheckIPOSupported: Document support for CUDA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10191
2025-01-18 09:40:27 -05:00
Brad King
6a3db56d64 Merge topic 'lcc-updates-2025-01'
a438a0460a ArgumentParserTypes: implement a workaround for EDG 6 assertion failure
d3edb67134 Tests: disable some tests on Alt Linux due to rpm config
68d730bcff Tests: switch off some RunCMake tests for broken libc on e2k
488de6294a CPack: correctly perform querytags on old versions of RPM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10174
2025-01-18 09:36:05 -05:00
Peter Kokot
fb4d5f34fd
CMakePrintHelpers: Enhance documentation
- Commands listed in the usual docs style
- Examples moved to a separate section after the signatures and output
  example added for the target properties
2025-01-18 11:02:12 +01:00
Charlie Savage
61c3718a00 FindRuby: Use find_program VALIDATOR
Avoid caching an unsuitable version of `Ruby_EXECUTABLE`.
2025-01-17 18:02:34 -05:00
Charlie Savage
e891159657 FindRuby: Clarify search process comments and conditions 2025-01-17 17:05:47 -05:00
Charlie Savage
9f0b3e90b6 FindRuby: Remove unused variable 2025-01-17 17:05:47 -05:00
Brad King
e184dda2da FindRuby: Query Ruby_EXECUTABLE again if it changes 2025-01-17 17:05:47 -05:00
Peter Kokot
2048b60f53 CheckIPOSupported: Document support for CUDA
Support was added for CMake 3.25 by commit 96bc59b1ca (CUDA: Add Device
LTO support for nvcc, 2022-04-22, v3.25.0-rc1~359^2).  While at it:

- Adjust the note about the required policy.
- Document which languages are checked when the LANGUAGES
  option is not specified.
2025-01-17 15:00:06 -05:00
Alaa Mahran
fc163f9e43 Tasking: Add support for ASM through the cctc compiler driver
The Tasking ASM information module was added by commit 94df5b6ef1
(Tasking: Add support for several compiler toolsets, 2022-07-20,
v3.25.0-rc1~133^2).  However, it appears to have been left from pattern
following and did not actually work with the Tasking assembler.
Update it to work when running the assembler through the compiler
driver `cctc`, which supports extensions `.asm` and `.src`.

Fixes: #26425
2025-01-17 14:44:01 -05:00
Alaa Mahran
942f0d119b Tasking: Add identification for the tasking assembler
Issue: #26425
2025-01-17 14:42:56 -05:00
Peter Kokot
8f2b7d2f53
CMakePushCheckState: Enhance documentation
This describes module macros as a list separately, adds some formatting
with synced lowercase code style, and extends examples a bit.
Additionally, the CMAKE_REQUIRED_QUIET variable is listed.
2025-01-17 18:03:44 +01:00
Peter Kokot
0348ae1a41
CMakePushCheckState: Add include_guard 2025-01-17 16:08:16 +01:00
Brad King
98a59ba8ad CMP0012: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Brad King
77f8c374f3 CMP0009: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Brad King
d77a7e8d1c CMP0007: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Brad King
759b55991a Merge topic 'renumber-to-4.0'
bd176b430c Renumber post-3.31 development from 3.32 to 4.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10183
2025-01-17 08:56:31 -05:00
Brad King
e95fce2849 Merge topic 'LINK_WARNING_AS_ERROR-extend-capabilities'
b350f95ecf LINK_WARNING_AS_ERROR property: extend capabilities
216c469214 MSVC: Use dash-style flag for LINK_WARNING_AS_ERROR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10133
2025-01-17 08:50:32 -05:00
Brad King
c234cc8e67 Merge topic 'FindMatlab-doc'
6e21dcc0ee FindMatlab: Fix multi-signature function documentation anchors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10186
2025-01-17 08:19:17 -05:00
Brad King
4f5f83a928 Merge topic 'FindMatlab-doc' into release-3.31
6e21dcc0ee FindMatlab: Fix multi-signature function documentation anchors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10186
2025-01-17 08:19:15 -05:00
makise-homura
488de6294a CPack: correctly perform querytags on old versions of RPM
In some versions of RPM, e.g. 4.0.4, rpmbuild does not understand
--querytags parameter, but rpm does. Such behavior was found on
Alt Linux P10 and Alt Linux Sisyphus (e2k).
2025-01-17 07:37:22 +03:00
Brad King
6e21dcc0ee FindMatlab: Fix multi-signature function documentation anchors
Fix use of the `signature::` directive by commit ae558b9ad0 (FindMatlab:
Support REGISTRY_VIEW, 2024-02-08, v3.30.0-rc1~528^2).  The directive
was created for use inside `Help/command/*.rst` documents.  Using it
in module documentation requires explicit anchors.
2025-01-16 14:28:17 -05:00
Brad King
216c469214 MSVC: Use dash-style flag for LINK_WARNING_AS_ERROR
MS tooling accepts either `/` or `-`.  We prefer the latter because it
interacts better with MSYS shells.  Update the table entry from commit
7907c83175 (Link step: Add LINK_WARNING_AS_ERROR target property,
2024-11-06).
2025-01-16 09:42:41 -05:00
Brad King
bd176b430c Renumber post-3.31 development from 3.32 to 4.0
Issue: #26613
2025-01-16 09:18:21 -05:00
Brad King
7ea82512ca Merge topic 'patch-GenerateExportHeader'
319dd29ef0 GenerateExportHeader: Use lowercase command names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10176
2025-01-16 08:52:33 -05:00
Brad King
9e6e9bd704 Merge topic 'improve-doc-verifymanifest'
470c4bcba1 CMakeVerifyManifest: Improve documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10175
2025-01-16 08:50:00 -05:00
Brad King
4ecf57dcd9 Merge topic 'homebrew-prefix'
da07c8ad2a macOS: Detect homebrew prefix from brew tool

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10138
2025-01-15 09:38:17 -05:00
Brad King
2245af3ab0 Merge topic 'clang-cuda-link-flags'
ae7f54e6a7 Clang/CUDA: Fix language-wide flags when linking .so with compiler driver

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: DavidRV00 <david@davidv.xyz>
Merge-request: !10173
2025-01-15 09:34:54 -05:00
Peter Kokot
319dd29ef0
GenerateExportHeader: Use lowercase command names
This syncs the command names of the GenerateExportHeader to use
lowercase style and adds few minor adjustmenst for the RST docs.
2025-01-15 09:57:05 +01:00
Christoph Grüninger
470c4bcba1 CMakeVerifyManifest: Improve documentation
Explain what it does.
Improve formatting.
Fix wrong lower-case m in example command.
2025-01-14 22:17:01 +01:00
Brad King
ae7f54e6a7 Clang/CUDA: Fix language-wide flags when linking .so with compiler driver
In commit cfa888a6e2 (Clang/CUDA: Add language-wide flags when linking
with compiler driver, 2024-10-07, v3.31.0-rc1~12^2) we added the wrong
placeholder to `CMAKE_CUDA_CREATE_SHARED_LIBRARY` to represent the
language-wide flags.  The `<FLAGS>` placeholder is for executables.
The `<LANGUAGE_COMPILE_FLAGS>` placeholder is for shared libraries.
The distinction is for historical reasons.

Fixes: #26563
2025-01-14 13:20:43 -05:00
Alexander Grund
da07c8ad2a macOS: Detect homebrew prefix from brew tool
Although not recommended by homebrew, users can install it in a
non-standard prefix.  Ask `brew --prefix` before using defaults.
2025-01-14 10:47:25 -05:00
Peter Kokot
04c5492cb0 FindPatch: Define imported target only for PROJECT CMAKE_ROLE
This enables finding the patch command when using CMake in script modes.
2025-01-14 10:17:09 -05:00
Brad King
c36ba41bee Merge topic 'patch-find-patch-2'
e39f0bcf34 FindPatch: Mark Patch_EXECUTABLE as advanced variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10165
2025-01-14 09:51:51 -05:00
Brad King
72e27a4856 Merge topic 'fix-typos-found-by-pre-commit-hooks'
d620d77d26 FindDoxygen: Rename `_Doxygen_dne_header` -> `_Doxygen_do_not_edit_header`
e7ff3cccea PushToAndroidDevice.cmake: Rename `cmake_parse_arguments` prefix
bc8621d999 Fix: A lot of typos in code found by `typos`
b33beb7af5 Help: Fix some typos found by `sphinx-lint`
78e45c2db6 Style: Replace TABs with spaces for indentation in some files
74e0173f66 Tests(NuGet): Fix the test to ignore empty and space-only lines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10151
2025-01-14 09:44:34 -05:00
Brad King
8913b83d7f Merge topic 'FindPython-ARTIFACTS_PREFIX'
9b0510fa57 FindPython: add support for multiple searches in same directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10157
2025-01-13 11:46:50 -05:00
Brad King
3c57d9bbc3 Merge topic 'patch-feature-summary'
0dab706e94 FeatureSummary: Enhance documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10142
2025-01-13 11:28:57 -05:00
Brad King
6a800f666f Merge topic 'CMAKE_LANG_LINK_MODE-variable-creation'
00932ea864 Introduce CMAKE_<LANG>_LINK_MODE variable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !10162
2025-01-13 11:23:32 -05:00
Alex Turbov
d620d77d26
FindDoxygen: Rename _Doxygen_dne_header -> _Doxygen_do_not_edit_header 2025-01-12 18:49:35 +04:00
Alex Turbov
e7ff3cccea
PushToAndroidDevice.cmake: Rename cmake_parse_arguments prefix
The upcoming `typos` spell checker don't like the old prefix,
so to avoid further false-positive, let's rename it to a more generic
and a bit more readable `_arg`.
2025-01-12 18:49:34 +04:00
Alex Turbov
bc8621d999
Fix: A lot of typos in code found by typos
Yet another great code spellchecker: https://github.com/crate-ci/typos/

(Will be added later as a `pre-commit` hook)
2025-01-12 18:49:34 +04:00
Alex Turbov
78e45c2db6
Style: Replace TABs with spaces for indentation in some files
Mark files that must use TABs to indent in the `.gitattributes`.
Use space instead of TABs in sources and some data/test files.
2025-01-12 18:49:25 +04:00
Peter Kokot
e39f0bcf34
FindPatch: Mark Patch_EXECUTABLE as advanced variable 2025-01-11 19:31:04 +01:00
Marc Chevrier
9b0510fa57 FindPython: add support for multiple searches in same directory
In some situations, like cross-compilation, it can be required to search for
the host python interpreter as well as the cross-compilation development
artifacts.
By managing different prefixes for the artifacts, multiple and independent
searches can be achieved.
2025-01-11 15:47:06 +01:00
Peter Kokot
0dab706e94
FeatureSummary: Enhance documentation
This fixes typos, syncs docs code style a bit and refactors functions
descriptions.

- Initial example improved and synced with the current
  `feature_summary()` output
- The global properties are listed with indentation
- Added reference links where it makes sense to better understand the
  terminology
- CMake versions added for all properties (they got introduced in CMake
  3.8)
- All "macro" words renamed to "function"
- "Legacy Macros" renamed to "Deprecated Functions"
2025-01-10 18:39:15 +01:00
Brad King
02b7250712 Merge topic 'lfortran-generate-object-code'
daf6cc89ee LFortran: Remove hard-coded --generate-object-code flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10159
2025-01-10 09:26:58 -05:00
Brad King
3df8890638 Merge topic 'lfortran-generate-object-code' into release-3.31
daf6cc89ee LFortran: Remove hard-coded --generate-object-code flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10159
2025-01-10 09:26:54 -05:00
Brad King
553df0000f Merge topic 'tasking-flags'
a2f24a7ba7 Tasking: Fix C Compiler standard and extension flags
730f72aa20 Tasking: Fix flag for COMPILE_WARNING_AS_ERROR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10152
2025-01-10 09:09:32 -05:00
Brad King
1ebfd7ac81 Merge topic 'gcc-import-std'
2a0ca6a26d ci: add jobs to test GCC 15-to-be with `import std`
469175c2e6 Experimental: recycle the `import std` UUID
a980dab9b1 gcc: support `import std`
2791b7564b Tests/RunCMake: handle C++26 support where needed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10023
2025-01-10 09:04:38 -05:00
Marc Chevrier
00932ea864 Introduce CMAKE_<LANG>_LINK_MODE variable.
This variable define how the link step is done. Possible values are:
* DRIVER: the compiler is used as driver for the link step
* LINKER: the linker is used directly for the link step.
2025-01-10 13:24:16 +01:00
Saurabh Kumar
daf6cc89ee LFortran: Remove hard-coded --generate-object-code flag
This was added in commit 98d0f918ba (LFortran: Add support for this
compiler, 2024-01-25, v3.31.0-rc1~303^2~2) because it is needed for
cases covered by CMake's Fortran tests.  However, it does not work
with Fortran modules and breaks lfortran's own `examples/project1`.
Move the flag to the test cases that need it, just as the original
commit did with `--implicit-interface`.

Fixes: #26597
Co-authored-by: Brad King <brad.king@kitware.com>
2025-01-09 14:49:39 -05:00
Alaa Mahran
a2f24a7ba7 Tasking: Fix C Compiler standard and extension flags
- Remove incorrect `--strict` flag for the C compiler.
- Add C compiler extensions.

Fixes: #26591
2025-01-09 11:49:07 -05:00
Alaa Mahran
730f72aa20 Tasking: Fix flag for COMPILE_WARNING_AS_ERROR
Issue: #26591
2025-01-09 11:49:07 -05:00
Brad King
9d0ceffd8b Merge topic 'reorder_compiler_detection_error'
52d1b4ad05 CompilerId: Console error output has first try last

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10141
2025-01-09 10:51:41 -05:00
Brad King
f875830868 Merge topic 'patch-script-mode'
b8067f1967 FPHSA: Hide hint message when running CMake in script mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10144
2025-01-09 10:48:24 -05:00
Brad King
ac54f5d50d Merge topic 'patch-found-var'
1a8e43d57d FindPackageHandleStandardArgs: Clarify the FOUND_VAR option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10134
2025-01-09 10:44:01 -05:00
Brad King
462e720bd8 Merge topic 'FeatureSummary-include_guard'
5fada06d6e FeatureSummary: Add include_guard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10140
2025-01-09 10:41:34 -05:00
Brad King
ecfdebc9f4 Merge topic 'bison-flex-output-directories'
c01d4e7698 FindBISON, FindFLEX: Create output directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10130
2025-01-09 10:34:22 -05:00
Ben Boeckel
a980dab9b1 gcc: support import std 2025-01-08 16:32:14 -05:00
Brad King
d949e7980c Merge topic 'FindBISON-OPTIONS-keyword'
211cec0f20 FindBISON: Add new keyword OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10129
2025-01-08 09:29:38 -05:00
Brad King
2f4d20bc32 Merge topic 'FindFLEX-OPTIONS-keyword'
d63ffb4116 FindFLEX: Add new keyword OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10137
2025-01-08 09:28:54 -05:00
Brad King
44db110d63 Merge topic 'FindFLEX-empty-COMPILE_FLAGS'
1310d43380 FindFlex: Add COMMAND_EXPAND_LISTS to remove empty arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10125
2025-01-08 09:26:36 -05:00
Brad King
5534b4afcf Merge topic 'FindBoost-1.87'
f485f94d1a FindBoost: Add support for Boost 1.87

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10147
2025-01-08 09:25:08 -05:00
Brad King
627d710570 Merge topic 'FindBoost-1.87' into release-3.31
f485f94d1a FindBoost: Add support for Boost 1.87

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10147
2025-01-08 09:25:07 -05:00
Brad King
f485f94d1a FindBoost: Add support for Boost 1.87
Update the list of known versions.

Run the command

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

to extract dependencies from the 1.87.0 source tree.

Dependencies differ from 1.86:

* Boost.Log no longer depends on Boost.Chrono

Fixes: #26562
2025-01-07 15:41:31 -05:00
Peter Kokot
211cec0f20
FindBISON: Add new keyword OPTIONS
This adds a new keyword OPTIONS which is a semicolon-separated list of
command-line options added to bison command line. This enables adding
options more intuitively. It mainly adds options as quoted arguments
which among other things enables adding paths containing spaces and
similar.

Fixes:
- https://gitlab.kitware.com/cmake/cmake/-/issues/23301
2025-01-06 06:41:57 +01:00
Peter Kokot
d63ffb4116
FindFLEX: Add new keyword OPTIONS
This adds a new keyword OPTIONS which is a semicolon-separated list of
command-line options added to flex command line. This enables adding
options more intuitively. It mainly adds options as quoted arguments
which among other things enables adding paths containing spaces and
similar.

Fixes:
- https://gitlab.kitware.com/cmake/cmake/-/issues/23301
2025-01-06 06:41:41 +01:00
Peter Kokot
b8067f1967
FPHSA: Hide hint message when running CMake in script mode
Issue: #25941
2025-01-06 06:06:25 +01:00
Robert Maynard
52d1b4ad05
CompilerId: Console error output has first try last
This ensures that a user after providing custom flags
will first see that attempt. Previously the compiler attempt with the user flags could have been lost due to
console log buffer / scrolling support
2025-01-03 11:27:26 -05:00
Marc Chevrier
b779fcf6a0 Merge topic 'FindPython-enhance-artifacts-consistency'
b1f0c5e476 FindPython: enhance artifacts consistency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10136
2025-01-03 06:22:09 -05:00
Peter Kokot
5fada06d6e
FeatureSummary: Add include_guard 2025-01-03 06:51:48 +01:00
Peter Kokot
4d2f1325ef
CheckLibraryExists: Enhance documentation
This syncs the code style using lowercase, explains the behavior in a
paragraph-style like in other chapters, and adds few basic usage
examples. Additionally, an explanation is added, when to use this
module.
2025-01-02 01:36:16 +01:00
Marc Chevrier
b1f0c5e476 FindPython: enhance artifacts consistency
Avoid to rely on _Python_EXECUTABLE variable if the Interpreter component
is not part of the current search.
2025-01-01 17:29:21 +01:00
Peter Kokot
1a8e43d57d
FindPackageHandleStandardArgs: Clarify the FOUND_VAR option
The `find_package_handle_standard_args(FOUND_VAR)` is deprecated as of
CMake 3.3 and both the `<PackageName>_FOUND` and the upper-cased
`<PACKAGE_NAME>_FOUND` are set with or without using this option.
Additionally, find modules and docs are also synced with this to make it
clearer.
2024-12-31 02:07:16 +01:00
Marc Chevrier
4771754c0d Merge topic 'CheckStructHasMember-enhance-documentation'
bcdfd6858d CheckStructHasMember: Improve and extend documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !10119
2024-12-30 09:40:41 -05:00
Marc Chevrier
a840f889f8 Merge topic 'patch-flex-bison-docs-2'
559a8d088a FindFLEX: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10128
2024-12-28 05:55:06 -05:00
Marc Chevrier
3107865fc2 Merge topic 'patch-flex-bison-docs'
1dcd38bdd0 FindBISON: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10126
2024-12-28 05:54:19 -05:00
Marc Chevrier
ed0f2d2f12 Merge topic 'patch-check-variable-exists'
e1723cab81 CheckVariableExists: Improve documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10122
2024-12-28 05:52:02 -05:00
Peter Kokot
1dcd38bdd0
FindBISON: Update documentation
This fixes typos and syncs the style according to other documentation
pages.
2024-12-27 20:30:25 +01:00
Peter Kokot
559a8d088a
FindFLEX: Update documentation
This fixes typos and syncs the style according to other documentation
pages.
2024-12-26 18:44:23 +01:00
Peter Kokot
c01d4e7698
FindBISON, FindFLEX: Create output directories
Bison and Flex executables at the time of writing don't create
output directories when generating files. In most cases this isn't issue
if the build directory is created before running bison or flex. If any
of the output directories that can be determined isn't available, these
modules now create them before running the bison or flex command.

Issue: #19529
2024-12-23 17:51:34 +01:00
Peter Kokot
e1723cab81
CheckVariableExists: Improve documentation
This uses the lowercase command signature and refactors the description
according to other similar documentation pages.
2024-12-22 17:30:49 +01:00
Peter Kokot
bcdfd6858d
CheckStructHasMember: Improve and extend documentation
This uses the lowercase command signature and refactors the description
according to other similar documentation pages.

The LANGUAGE option is described separately.
2024-12-22 17:07:44 +01:00
Peter Kokot
2116b3460b
Help: Use lower-case style in documentation 2024-12-22 16:56:46 +01:00
Marc Chevrier
9df2ccb1e8 Merge topic 'Help-FindPython-Fix-typo'
e7ea2998fb Help: FindPython: fix typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10121
2024-12-22 07:17:53 -05:00
Peter Kokot
1310d43380
FindFlex: Add COMMAND_EXPAND_LISTS to remove empty arguments
This is a follow-up of 3ffc8a6b61

When using generator expressions in the COMPILE_FLAGS argument, and the
generator expression expands to an empty string, command gets an empty
argument with double quotes where flex command-line tool errors out
with `/usr/bin/flex: can't open` error. This removes empty arguments
from the created flex command.
2024-12-22 00:11:28 +01:00
Marc Chevrier
e7ea2998fb Help: FindPython: fix typo 2024-12-21 17:50:25 +01:00
Brad King
71e2596a73 NVHPC: Add support for CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN
NVHPC has a `--gcc-toolchain=` flag just like LLVM/Clang and IntelLLVM.
2024-12-16 14:15:56 -05:00
Brad King
265bc4e946 Merge topic 'hurd-linker'
c4f64cee36 CMakeParseImplicitLinkInfo: Do not mistake ld.so for a linker
a47283801e hurd: Add GNU linker options
4d1066c578 hurd: Add more GNU options support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10092
2024-12-13 09:00:27 -05:00
Samuel Thibault
c4f64cee36 CMakeParseImplicitLinkInfo: Do not mistake ld.so for a linker
Our pattern meant to match `/usr/bin/ld`, `ld.exe`, etc., unfortunately also
captures `ld.so`, which happens to be the dynamic linker on x86 GNU/Hurd.
Through `linker_tool_regex`, this:

    elseif("${line}" MATCHES "${linker_tool_regex}")
      set(linker_tool "${CMAKE_MATCH_2}")
    endif()

is then assuming that:

    /.../collect2 [...] -dynamic-linker /lib/ld.so [...]

claims the linker to be `/lib/ld.so`, and stops there, without noticing
further down in the log:

    /usr/bin/ld [...] -dynamic-linker /lib/ld.so [...]

which is what should be claiming `/usr/bin/ld` is the linker.
2024-12-12 09:20:37 -05:00
Samuel Thibault
a47283801e hurd: Add GNU linker options
Fixes: #26518
2024-12-12 09:19:36 -05:00
Marc Chevrier
11aff3c490 FindPython: enhance Development artifacts lookup in virtual environment
To enable to locate development artifacts, in the context of virtual
environment, without requiring Interpreter component, rely on the
configuration file pyvenv.cfg.

Fixes: #26505
2024-12-12 13:53:11 +01:00
Samuel Thibault
4d1066c578 hurd: Add more GNU options support 2024-12-11 20:18:56 +01:00
Brad King
ed0baf1ec5 Merge topic 'rvm_refactor'
f06b2af291 Tests/FindRuby/Rvm: Honor Ruby_FIND_VIRTUALENV ONLY
a023377b86 FindRuby: Move checking of RVM and System Ruby to separate functions.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10071
2024-12-10 09:18:31 -05:00
Brad King
90e3d69551 Merge topic 'hurd-rpath-origin'
8d2f6f0971 hurd: Fix runtime path test
0c452257e7 hurd: Add relative rpath support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10078
2024-12-10 09:17:30 -05:00
Brad King
27be881b3f Merge topic 'vs-clang-cl-c++23'
30139913e9 VS: Restore support for mixing C++23 and C in one target with clang-cl
57da8712c1 VS: Factor out check for mixed C and C++ target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10082
2024-12-10 09:12:04 -05:00
Brad King
30139913e9 VS: Restore support for mixing C++23 and C in one target with clang-cl
Since commit 474eafe28c (clang-cl: Add support for C++23, 2024-09-13,
v3.31.0-rc1~97^2) we use a Clang-specific flag to enable C++23 since
`clang-cl` has no `-std:c++23` flag, and `-std:c++latest` may enable an
even newer version of C++.  However, in `.vcxproj` files there is no way
to express a target-wide `-clang:-std=c++23` flag for only C++ sources
when the target also has C sources.  Add a special case to map back to
`-std:c++latest` for targets with C++23 and C together.

Fixes: #26508
2024-12-09 14:57:35 -05:00
Samuel Thibault
0c452257e7 hurd: Add relative rpath support 2024-12-09 01:22:18 +01:00
Peter Kokot
70ccf47e60
Help: Add more examples for condition syntax in commands
Issue: #26487
2024-12-06 03:09:46 +01:00
cfis
a023377b86 FindRuby: Move checking of RVM and System Ruby to separate functions. 2024-12-04 13:21:04 -08:00
David Tenty
a6f2e9eded IBMClang: Express compiler information as a Clang variant
De-duplicate IBMClang compiler information by detecting the base clang
version and following the same logic as we do for any other clang of
that version.  This helps maintain support for new IBMClang features
inherited from new base Clang versions.

We already use this approach for other Clang variants, like CrayClang
and FujitsuClang.
2024-12-04 14:01:52 -05:00
David Tenty
cac5eb3df2 CompilerId: Ensure internal compiler version string is not optimized out
This was missed in commit 27579e9cf1 (FujitsuClang: Add support for the
Fujitsu compiler in Clang mode, 2020-12-22, v3.21.0-rc1~402^2~5).
2024-12-04 09:28:57 -05:00
Brad King
39b96cb0d9 Merge topic 'vs-WindowsKernelModeDriver'
2709f07b4d VS: Add minimal support for Windows Kernel Mode Drivers
fec276e632 cmVisualStudio10TargetGenerator: Use inline member initialization

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10042
2024-12-04 08:52:56 -05:00
Brad King
61a57ea717 Merge topic 'doc-check-run'
94b6f8bf4a Help: Check*Runs requires exit code 0 for success

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10047
2024-12-04 08:51:40 -05:00
Brad King
5c490d671a Merge topic 'find_ruby_cleanup'
48bf16fba1 FindRuby: Remove unneeded code and define all functions at the top-level.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10063
2024-12-04 08:50:51 -05:00
scivision
94b6f8bf4a Help: Check*Runs requires exit code 0 for success
Explicitly state this requirement to avoid ambiguity in what is
'success' of a program.
2024-12-03 16:00:26 -05:00
cfis
48bf16fba1 FindRuby: Remove unneeded code and define all functions at the top-level. 2024-12-03 12:12:59 -08:00
Joseph Snyder
2709f07b4d VS: Add minimal support for Windows Kernel Mode Drivers
Extend the experimental support for `WindowsKernelModeDriver` to the
Visual Studio generators.  Hard-code some settings for now.
2024-12-03 14:18:52 -05:00
مهدي شينون (Mehdi Chinoune)
3c3f887ff6 FindOpenMP: Fix typo on omp Fortran module name. 2024-12-03 13:42:18 -05:00
Brad King
b1ab297d07 Merge topic 'FindPython-SABIModule-handling'
ff65c5fca0 FindPython: Ensure SABIModule is found in all cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10058
2024-12-03 09:04:42 -05:00
Brad King
50afcb61f7 Merge topic 'FindPython-SABIModule-handling' into release-3.31
ff65c5fca0 FindPython: Ensure SABIModule is found in all cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10058
2024-12-03 09:04:41 -05:00
Brad King
25ef01bd65 Merge topic 'flang-openmp'
c3bada79cd FindOpenMP: Fix Finding OpenMP for LLVMFlang on Windows.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10052
2024-12-03 09:03:48 -05:00
Brad King
2af8fee380 Merge topic 'FindRuby-3.4'
21e51dca1d FindRuby: Add support for 3.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10055
2024-12-03 09:00:47 -05:00
cfis
21e51dca1d FindRuby: Add support for 3.4 2024-12-02 13:25:54 -05:00
Marc Chevrier
ff65c5fca0 FindPython: Ensure SABIModule is found in all cases
Fixes: #26493
2024-12-02 17:37:18 +01:00
Brad King
40cb75e3a1 Merge topic 'linker-depfile-flag'
f4e74af1ea GNU linker: Use single-argument form of --dependency-file flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10049
2024-11-29 10:00:13 -05:00
Brad King
27647acc6c Merge topic 'linker-depfile-flag' into release-3.31
f4e74af1ea GNU linker: Use single-argument form of --dependency-file flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10049
2024-11-29 10:00:12 -05:00
Brad King
8d98c6b1c2 Merge topic 'intel-classic-no-linker-depfile'
aeaec06267 Intel/Classic: deactivate linker dependency file support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10048
2024-11-29 09:59:01 -05:00
مهدي شينون (Mehdi Chinoune)
c3bada79cd FindOpenMP: Fix Finding OpenMP for LLVMFlang on Windows. 2024-11-29 12:11:44 +01:00
Brad King
f4e74af1ea GNU linker: Use single-argument form of --dependency-file flag
The GNU `ld(1)` manual documents the `--dependency-file=depfile`
single-argument form of the flag.  Prefer it over the multi-argument
`--dependency-file depfile` form so that only one argument needs to be
passed through the compiler driver by `-Wl,` or equivalent.  This may
improve diagnostics in cases where it is unsupported, making them easier
to diagnose.

Issue: #26483
2024-11-28 10:07:52 -05:00
Marc Chevrier
aeaec06267 Intel/Classic: deactivate linker dependency file support
The Intel Classic compilers' IPO plugins do not support the
`-Wl,--dependency-file,...` linker flag.

Fixes: #26483
2024-11-28 09:54:22 -05:00
Brad King
14ed8464c8 Merge topic 'ARCHIVER-prefix'
a4ff2b01e3 IntelLLVM-Windows: add definitions for ARCHIVER: prefix
521a6d409c Archive library: Add support for ARCHIVER: prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10038
2024-11-28 09:22:38 -05:00
Brad King
e0fd630e93 Merge topic 'fphsa-refactorings'
a67df19d82 FPHSA: Consistent quoting in reported messages
440d4446f5 FPHSA: Consistent character case when mentioning the command name
998d5b1ad0 FPHSA: Consistent style for CMake command calls
c1d49b3f3c FPHSA: Refactor to use `ZIP_LISTS`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10044
2024-11-27 09:09:28 -05:00
Brad King
8a0ebc29da Merge topic 'FeatureSummary-condition-syntax'
6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10031
2024-11-27 09:08:29 -05:00
Alex Turbov
a67df19d82
FPHSA: Consistent quoting in reported messages
Command names are not enclosed into quotes/backticks and have `()`
at the end. Named arguments (keywords) have no quotes as well.
2024-11-26 23:40:01 +04:00
Marc Chevrier
a4ff2b01e3 IntelLLVM-Windows: add definitions for ARCHIVER: prefix
Configure ARCHIVER: prefix to enable the archive libraries management
with Windows-IntelLLVM.

Issue: #26300
2024-11-26 19:26:08 +01:00
Peter Kokot
6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax
Closes: #26468
2024-11-26 13:19:25 -05:00
SunBlack
7e2aee4458 FindGDAL: Document as deprecated in favor of upstream CMake package
Issue: #26471
2024-11-26 13:13:20 -05:00
Alex Turbov
440d4446f5 FPHSA: Consistent character case when mentioning the command name 2024-11-26 19:58:25 +04:00
Alex Turbov
998d5b1ad0 FPHSA: Consistent style for CMake command calls
No space after a command name and before `()`!
2024-11-26 19:58:18 +04:00
Alex Turbov
c1d49b3f3c FPHSA: Refactor to use ZIP_LISTS 2024-11-26 19:58:14 +04:00
Marc Chevrier
a322aead0f CheckPIESupported: ensure PIE compile flags are specified
Fixes: #26463
2024-11-25 14:24:06 +01:00
Brad King
43c665fd85 Merge topic 'remove-trailing-blank-lines'
99ac59d31b style: Remove trailing blank lines from all CMake sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10026
2024-11-22 09:01:55 -05:00
Matthew Woehlke
99ac59d31b style: Remove trailing blank lines from all CMake sources
Our development workflow tooling prevents trailing blank lines
from being added, but some such lines remain from before that
was enforced.  Remove them to make it easier to rename files
without triggering enforcement.
2024-11-21 15:48:02 -05:00
Brad King
abbe8e860d Merge topic 'various-refactorings'
8352a2d12f cmFileCommand.cxx: Optimize `cmStrCat()` calls
e2c9bb7f54 cmFindBase.cxx: Optimize `cmStrCat()` calls
16a1fa9e35 cmFindBase.cxx: Check `DebugMode` and exit early to reduce indentation
6751b3d9b4 cmLocalGenerator.cxx: Optimize `std::ostream::operator<<()` calls
11bf70f968 FindPackageHandleStandardArgs: Remove the unneeded symbol from the message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10013
2024-11-20 09:34:21 -05:00
Brad King
68d15b17c3 Merge topic 'ExternalProject-install-jobserver'
1bdaad7573 ExternalProject: Optionally integrate 'make' job server with INSTALL_COMMAND

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10015
2024-11-20 09:33:04 -05:00
Brad King
3a483ccabe Merge topic 'pkg-config-versionadded'
c14a9c4648 Help: Correct FindPkgConfig version tags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10012
2024-11-20 09:28:26 -05:00
Brad King
1bdaad7573 ExternalProject: Optionally integrate 'make' job server with INSTALL_COMMAND
Add an `INSTALL_JOB_SERVER_AWARE` option to `ExternalProject_Add`.
When using an explicit `INSTALL_COMMAND`, the generated commands
won't use `$(MAKE)` thus failing to connect to the outer make's
job server.  Add an option enable explicit job server integration.

This is the install step's equivalent to the build step's
`BUILD_JOB_SERVER_AWARE` option added by commit bc43398e72
(ExternalProject: Enable Make Job Server with Explicit Build Command,
2023-08-09, v3.28.0-rc1~217^2).  It is useful when the external
project's installation is driven by its build system.  Note that with
Makefile generators, our default install command does use `$(MAKE)` to
connect to the outer make's job server.

Issue: #26398
2024-11-19 10:22:24 -05:00
Brad King
542c3259a3 Merge topic 'armclang-no--list'
688d9ee9c2 ARMClang: Remove orphaned linker --list option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10008
2024-11-19 10:15:38 -05:00
Brad King
af3a48a591 Merge topic 'Linux-deduplication-static-libs'
0445190d2f LLD linker: avoid regression on archive libraries deduplication

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10010
2024-11-19 10:14:42 -05:00
Alex Turbov
11bf70f968 FindPackageHandleStandardArgs: Remove the unneeded symbol from the message 2024-11-19 17:57:27 +04:00
FeRD (Frank Dana)
c14a9c4648 Help: Correct FindPkgConfig version tags
Two features in FindPkgConfig were added in a CMake version where
they were initially broken, and could only be used once the
implementation was fixed in a later version.

Previously, the docs contained a `.. versionadded` tag denoting the
version where the _broken_ implementation was introduced (its true
"version added", if we're being literal), with a comment in the
documentation source noting that the feature didn't actually work
correctly until whatever later version the comment specifies.

Since that's completely backwards, from a user perspective, reverse
the documentation so that the `.. versionadded` message shows when
the feature first worked **correctly**, with a comment noting that
support was technically introduced in an earlier version, but in a
broken/nonfunctioning state.
2024-11-19 02:23:25 -05:00
Marc Chevrier
0445190d2f LLD linker: avoid regression on archive libraries deduplication
Due to a bug on LLD linker for ELF binaries, deduplication should
occur only if CMP0156 and CMP0179 are NEW.

Fixes: #26447
2024-11-18 21:02:50 +01:00
Daniel Brondani
688d9ee9c2 ARMClang: Remove orphaned linker --list option
Setting the `armlink --list` option without other diagnostic flags is
misleading because it produces an empty file and prevents the user from
printing diagnostics to the standard output or redirecting them to
another file.

It's unclear why the flag was added when support for ARMClang was first
added by commit 7b0abaac31 (ARMClang: Add support for Clang-based ARM
compiler, 2019-05-13, v3.15.0-rc1~111^2).

Fixes: #21538
2024-11-18 13:59:16 -05:00
Brad King
79a83ddb08 Apple: Enable linking during iOS/tvOS/visionOS/watchOS toolchain inspection
Since commit 11da882a12 (Apple: Introduce separate system name for iOS,
tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) our toolchain
inspection steps, like ABI detection, tell `try_compile` to use a
`STATIC_LIBRARY` instead of an `EXECUTABLE`.  This was needed at the
time to avoid codesign requirements.  However, commit d3a64c4e3f (Xcode:
Explicitly turn off signing in try_compile projects, 2020-07-16,
v3.19.0-rc1~483^2) introduced a more general solution to that problem.
Restore linking during toolchain inspection so that we can detect and
identify the linker.

Suggested-by: Marc Chevrier <marc.chevrier@gmail.com>
Fixes: #26443
2024-11-14 11:06:49 -05:00
Brad King
1e0cd39460 Merge topic 'link-warning-as-error'
7907c83175 Link step: Add LINK_WARNING_AS_ERROR target property
656267c871 COMPILE_WARNING_AS_ERROR: rename methods to prepare link similar functionality

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9984
2024-11-13 09:24:36 -05:00
Brad King
fe872cc98c Merge topic 'musl-linux-any'
d8559ec92e Linux: Recognize multiarch directories for musl-linux-any

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9991
2024-11-13 09:19:25 -05:00
Brad King
6a25904983 Merge topic 'musl-linux-any' into release-3.31
d8559ec92e Linux: Recognize multiarch directories for musl-linux-any

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9991
2024-11-13 09:19:23 -05:00
Brad King
d84abc02db Merge topic 'image-magick-7'
f6c6032e22 FindImageMagick: Fix ARCH_INCLUDE_DIR detection for version 7 and newer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9990
2024-11-13 09:18:19 -05:00
Brad King
3819471e71 Merge topic 'image-magick-7' into release-3.31
f6c6032e22 FindImageMagick: Fix ARCH_INCLUDE_DIR detection for version 7 and newer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9990
2024-11-13 09:18:18 -05:00
Brad King
8d652dc191 Merge topic 'WHOLE_ARCHIVE-various-systems'
d2997ab601 Linker configuration: Add missing platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9992
2024-11-13 09:17:25 -05:00
Brad King
10f24d1d92 Merge topic 'WHOLE_ARCHIVE-various-systems' into release-3.31
d2997ab601 Linker configuration: Add missing platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9992
2024-11-13 09:17:24 -05:00
Brad King
fc5cdacb11 Merge topic 'gtest-discover-flush-duplicates'
007d7ea648 GoogleTest: Avoid extra call to set DISABLED test property in discovery
9a24c1e802 GoogleTest: Clear script content buffer on flush and flush less often

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9982
2024-11-13 09:14:38 -05:00
Brad King
7c999c19af Merge topic 'gtest-discover-flush-duplicates' into release-3.31
007d7ea648 GoogleTest: Avoid extra call to set DISABLED test property in discovery
9a24c1e802 GoogleTest: Clear script content buffer on flush and flush less often

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9982
2024-11-13 09:14:37 -05:00
Timo Röhling
d8559ec92e Linux: Recognize multiarch directories for musl-linux-any
When bootstrapping Debian for musl-linux-any, the multiarch directories
are not found due to an overly-specific regular expression.

See https://bugs.debian.org/1085507 for the original bug report.
2024-11-12 10:47:40 -05:00
Marc Chevrier
d2997ab601 Linker configuration: Add missing platforms
The following platforms were missing:
* Android
* WindowsCE, WindowsPhone, WindowsStore and WindowsKernelModeDriver

And enhance various Apple platforms support (iOS, tvOS, etc...)

Fixes: #26439
2024-11-12 16:46:54 +01:00
Timo Röhling
f6c6032e22 FindImageMagick: Fix ARCH_INCLUDE_DIR detection for version 7 and newer
The `magick-baseconfig.h` header has been moved to a different subdirectory.

See https://bugs.debian.org/1087233 for the original bug report in Debian.
2024-11-12 10:38:54 -05:00
Craig Scott
007d7ea648 GoogleTest: Avoid extra call to set DISABLED test property in discovery
For very long test names, this can noticeably reduce the size of the
generated file contents when tests are disabled. This change reduces
how far beyond the flush threshold the content can grow before being
flushed.

Issue: #26431
2024-11-12 10:22:23 -05:00
Craig Scott
9a24c1e802 GoogleTest: Clear script content buffer on flush and flush less often
There's no need to check if flushing is needed after every command
is added to the variable holding the script content. It is enough to only
check once per test name. This simplifies the flushing logic, removing
the need for a separate flush_script() command. Previously, we were
not clearing the flushed script contents in all cases, but this is now
rigorously enforced at the one location where flushing is performed.

Also simplify the flushing of the list of test names, since that too doesn't
need a separate command. It is simpler and safer to handle that
directly inline where the one call to flush_tests_buffer() was
previously being made.

Fixes: #26431
2024-11-12 10:22:21 -05:00
Brad King
b14df1b4bb Merge topic 'FindSQLite3-pkg-config'
2d228201fc Help: Guard calls to pkg_check_modules in cmake-developer(7) example
674a987898 FindSQLite3: Guard calls to pkg_check_modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9983
2024-11-12 10:16:48 -05:00
Brad King
4f0eb0a41e Merge topic 'FindSQLite3-pkg-config' into release-3.31
2d228201fc Help: Guard calls to pkg_check_modules in cmake-developer(7) example
674a987898 FindSQLite3: Guard calls to pkg_check_modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9983
2024-11-12 10:16:46 -05:00
Brad King
db250e0734 Merge topic 'FindBoost-1.86'
f941fb6c0b FindBoost: Add support for Boost 1.86

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9988
2024-11-12 10:13:32 -05:00
Brad King
20a1ee1a9d Merge topic 'FindBoost-1.86' into release-3.31
f941fb6c0b FindBoost: Add support for Boost 1.86

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9988
2024-11-12 10:13:31 -05:00
Marc Chevrier
7907c83175 Link step: Add LINK_WARNING_AS_ERROR target property
Add a way to specify, in a portable way, to raise an error for any
warning during the link step. For that purpose, define:
* CMAKE_LINK_WARNING_AS_ERROR variable
* LINK_WARNING_AS_ERROR target property

Fixes: #25343
2024-11-12 15:11:53 +01:00
Brad King
f941fb6c0b FindBoost: Add support for Boost 1.86
Update the list of known versions.

Run the command

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

to extract dependencies from the 1.86.0 source tree.
They are the same as 1.85's dependencies, so just update
the version check for warning about newer versions.

Fixes: #26433
2024-11-11 13:44:47 -05:00
Peter Kokot
674a987898 FindSQLite3: Guard calls to pkg_check_modules
This was missed in commit 25b947589a (Modules: Guard calls to
pkg_check_modules, 2024-08-07, v3.31.0-rc1~236^2).
2024-11-11 10:53:21 -05:00
Brad King
7b19531291 macOS: Do not pass any SDK/-isysroot to compilers by default
On modern macOS, compiler wrappers like `/usr/bin/cc` automatically
choose a SDK to pass via `-isysroot` to an underlying compiler from
Xcode or the CommandLineTools.  Other toolchains like Homebrew's `gcc-*`
come with a default SDK too.  Therefore, when targeting macOS, we no
longer need to choose any SDK or pass an `-isysroot` flag by default.

Update initialization of `CMAKE_OSX_SYSROOT` to be empty by default when
targeting macOS.

Fixes: #19180
2024-11-07 09:46:10 -05:00
Brad King
3b8b70fe72 macOS: Simplify logic converting CMAKE_OSX_SYSROOT to a path 2024-11-07 09:46:10 -05:00
Brad King
c55c113076 macOS: Revert finding tools inside Xcode that are not in the PATH
Since commit 03ab170fe0 (OS X: Enable command-line build without tools in
PATH, 2013-08-05, v2.8.12~111^2) we find compilers such as

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc

when there is no corresponding compiler in the PATH.  However, modern
macOS versions always have `/usr/bin/cc` in the PATH, so this code path is
never taken (similarly for `make`).  Even if it were, the compilers in
Xcode cannot be used by build systems that do not add an `-isysroot` flag.
Instead, they should be used through the `/usr/bin/cc` wrapper, which
internally calls Xcode's compiler with a default `-isysroot` flag.
2024-11-07 09:46:09 -05:00
Brad King
77fcee9204 macOS: Revert "Resolve compiler in /usr/bin to that reported by Xcode xcrun"
Revert commit 1f085e11e4 (OS X: Resolve compiler in /usr/bin to that
reported by Xcode xcrun, 2015-01-03, v3.2.0-rc1~126^2~1).  The compilers
in Xcode cannot be used by build systems that do not add an `-isysroot`
flag.

Issue: #19180
2024-11-07 09:46:09 -05:00
Brad King
3f6164d9c4 Merge topic 'doc-CheckTypeSize'
b71ed8ce05 CheckTypeSize: Add code examples

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9971
2024-11-05 09:03:03 -05:00
Peter Kokot
b71ed8ce05 CheckTypeSize: Add code examples
This adds some basic examples of the `<variable>_CODE` and
`<variable>_KEYS`.
2024-11-04 10:55:11 -05:00
Peter Kokot
b76009bb5a CheckTypeSize: Document default language
When LANGUAGE keyword is not provided default language for the
check_type_size is C.
2024-11-04 10:39:16 -05:00
Philip Lorenz
ec22cf1a67 CMakeDetermineCompilerABI: Strip -pipe from compile flags
When `-pipe` is enabled, GCC passes data among its different executables
using pipes instead of temporary files.  This leads to issues when cmake
attempts to infer compiler internals via the `-v` flag as each
executable will print to `stderr` in parallel.  Avoid this by stripping
`-pipe` from the compilation flags during compiler inspection.

This extends commit d5895f50c3 (CMakeDetermineCompilerABI: Avoid failing
on warnings with -Werror, 2020-01-30, v3.17.0-rc1~32^2).
2024-10-29 13:13:08 -04:00
Brad King
86fe6dd869 Merge topic 'FindCUDAToolkit-remove-debug-message'
fb0b3d1585 FindCUDAToolkit: Remove debug message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9946
2024-10-28 09:28:01 -04:00
Brad King
fcff1dcb06 Merge topic 'FindCUDAToolkit-remove-debug-message' into release-3.31
fb0b3d1585 FindCUDAToolkit: Remove debug message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9946
2024-10-28 09:28:00 -04:00
Brad King
8779b1ad28 Merge branch 'backport-ci-fedora-41' into ci-fedora-41 2024-10-26 06:02:18 -04:00
Brad King
7605228f5e codespell: Fix typos 2024-10-25 08:43:04 -04:00
Seth R Johnson
fb0b3d1585 FindCUDAToolkit: Remove debug message
This was left accidentally by commit 587c0443cc (FindCUDAToolkit:
Support CUDA version extraction from version.json, 2023-05-02,
v3.26.4~3^2).
2024-10-25 08:32:00 -04:00
Brad King
0ba8bdb5c2 Merge topic 'doc-BUILD_TESTING'
9510820d58 Help: Document CTest module BUILD_TESTING variable
6e6e688b80 CTest: Improve formatting of documentation cmake code blocks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9927
2024-10-25 08:23:25 -04:00
Brad King
1380d0ddfa Merge topic 'windows-kernel-mode-driver'
54bbd00448 WindowsKernelModeDriver: Switch to appending to variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9941
2024-10-25 08:21:33 -04:00
Brad King
ebd038613e Merge topic 'windows-kernel-mode-driver' into release-3.31
54bbd00448 WindowsKernelModeDriver: Switch to appending to variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9941
2024-10-25 08:21:32 -04:00
Brad King
e5be5c7706 Merge topic 'lfortran-link-info'
34067963cc LFortran: Improve detection of implicit link information for lfortran 0.40+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9939
2024-10-25 08:19:56 -04:00
Brad King
0a37acc607 Merge topic 'lfortran-link-info' into release-3.31
34067963cc LFortran: Improve detection of implicit link information for lfortran 0.40+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9939
2024-10-25 08:19:54 -04:00
Brad King
aebbbb2840 Merge topic 'linker-configuration-enhancements'
0619c064ff Linker configuration: enhance usability

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9937
2024-10-25 08:18:29 -04:00
Joseph Snyder
54bbd00448 WindowsKernelModeDriver: Switch to appending to variables
When using the WindowsKernelModeDriver, do not add the new paths
if the variable was not previously defined.  Instead, append them
to the existing value.

Add a new GUID for the Experimental mode gate
2024-10-24 13:20:08 -04:00
Robert Maynard
9510820d58 Help: Document CTest module BUILD_TESTING variable
The `BUILD_TESTING` variable is referenced in `add_test` and
`enable_testing`.  It should be documented as it controls the
behavior tests working when projects use `include(CTest)`.
2024-10-24 11:46:37 -04:00
Brad King
6e6e688b80 CTest: Improve formatting of documentation cmake code blocks 2024-10-24 11:43:31 -04:00
Brad King
34067963cc LFortran: Improve detection of implicit link information for lfortran 0.40+
These versions of LFortran support passing `-v -Wl,-v` to the underlying
compiler so we can extract the full implicit link information.

Issue: #26145
2024-10-24 11:15:12 -04:00
Marc Chevrier
0619c064ff Linker configuration: enhance usability
The linker configuration file is now optional: It is loaded only if
variable CMAKE_<LANG>_USE_LINKER_CONFIGURATION is set to TRUE.

The file CMakeAddNewLanguage.txt is updated to take into account the
linker configuration.

Fixes: #26393
2024-10-24 16:37:30 +02:00
Peter Kokot
3ffc8a6b61
FindBISON: Add COMMAND_EXPAND_LISTS to remove empty arguments
When using generator expressions in the COMPILE_FLAGS argument, and the
generator expression expands to an empty string, command gets an empty
argument with double quotes where GNU bison command-line tool errors out
with `/usr/bin/bison: extra operand` error. This removes empty arguments
from the created bison command.
2024-10-20 15:36:17 +02:00
Brad King
89b1997d38 Merge topic 'python3.14'
be958c8f35 FindPython: Add support for Python 3.14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9915
2024-10-18 07:36:53 -04:00
Brad King
da4a815c3a Merge topic 'python3.14' into release-3.31
be958c8f35 FindPython: Add support for Python 3.14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9915
2024-10-18 07:36:52 -04:00
Miro Hrončok
be958c8f35 FindPython: Add support for Python 3.14 2024-10-17 20:04:25 -04:00
Brad King
7c22085fad Merge topic 'ios-mac-catalyst'
b49b03a62e Xcode: Use ad-hoc signing during compiler id for iOS Mac Catalyst

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9908
2024-10-17 08:25:30 -04:00
Brad King
b49b03a62e Xcode: Use ad-hoc signing during compiler id for iOS Mac Catalyst
In commit 2785364b7b (iOS: Add support for Mac Catalyst, 2024-07-02,
v3.31.0-rc1~371^2) we forgot to update the conditions to use ad-hoc
signing from commit 89e1113e0c (Xcode: Use ad-hoc signing during
compiler id on macOS, 2022-06-10, v3.22.6~4^2~2).

Fixes: #26376
2024-10-16 15:04:56 -04:00
Brad King
d9baceead0 Merge topic 'bug_remove_nvjitlink_from_nvrtc'
9d29544082 FindCUDAToolkit: nvrtc shouldn't hard depend on nvJitLink

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9902
2024-10-15 10:29:58 -04:00
Robert Maynard
9d29544082
FindCUDAToolkit: nvrtc shouldn't hard depend on nvJitLink
The dependency on nvJitLink was due to misunderstanding how runtime compiled code that uses
LTO is used. It doesn't require nvrtc to have a dependency on nvJitLink, just the caller.
2024-10-14 10:16:29 -04:00
Tobias Mayer
76c2d7781e FindCURL: Add more target properties from pkg-config
In case libcurl was found via pkg-config, the properties
`INTERFACE_LINK_LIBRARIES`, `INTERFACE_LINK_OPTINS`, and
`INTERFACE_COMPILE_OPTINS` can be populated from the `PC_CURL_*`
variables if available.

Fixes: #26365
2024-10-14 10:11:15 -04:00
Brad King
df19fcb78b Merge topic 'FindProtobuf-protoc-exe-option'
53717488ea FindProtobuf: Add PROTOC_EXE option to protobuf_generate
f4dc24b527 FindProtobuf: Clarify protobuf_generate options documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9888
2024-10-11 09:18:51 -04:00