Commit Graph

14568 Commits

Author SHA1 Message Date
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
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
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