Commit Graph

14658 Commits

Author SHA1 Message Date
Brad King
3a93def224 Merge topic 'issue_FindPython_SABI'
1995557885 FindPython : fix a misspelled variable name in __python_import_library macro.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10255
2025-01-30 08:49:17 -05:00
Brad King
3e64c6a56e Merge topic 'msvc-runtime-checks'
2b2344b412 MSVC: Add abstraction for runtime checks
49dcd1ce5d Help: Fix MSVC_DEBUG_INFORMATION_FORMAT description of example
2f8e643d9d CMP0141: Fix documentation copied from CMP0091

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !10214
2025-01-30 08:48:01 -05:00
Brad King
892204764f Merge topic 'help-code-block'
9890cfc4ec Help: More syntax highlighting for literal blocks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10258
2025-01-30 08:41:16 -05:00
Nikita Nemkin
9890cfc4ec Help: More syntax highlighting for literal blocks
Covers almost all blocks containing actual code, except:

* Parsed-literal blocks can't be highlighted, including many command
  summaries and substitution-heavy docs like find_... commands.
  This is a Sphinx limitation.

* Code with errors, like CMP0049, DEPLOYMENT_ADDITIONAL_FILES,
  DEPLOYMENT_REMOTE_DIRECTORY, @PACKAGE_INIT@ substitution in the
  tutorial, bracket arguments/comments in cmake-language.7 and
  cmake-developer.7.

* FindQt4 module, which needs reformatting.
2025-01-29 16:48:53 -05:00
Charlie Savage
64e4b4c638 FindRuby: Reformat code so it is consistent 2025-01-29 10:29:16 -08:00
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