This updates the documentation for the CMAKE_FIND_BINARY and
CMAKE_FIND_PACKAGE Autoconf macros to imitate other Autoconf macros
internal documentation style with some stylistic adjustments for
readability of the arguments.
- CMAKE_FIND_PACKAGE: Links to docs are added instead of listing
compiler IDs. The 5th ($5) and 6th ($6) arguments descriptions are
updated to be action-if-found and action-if-not-found according to the
current code.
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
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
In commit fe3f846e1b (Makefiles: Add support for building Fortran
intrinsics, 2020-11-19, v3.22.0-rc1~565^2) the property was added with
incorrect spelling `Fortran_BUILDING_INSTRINSIC_MODULES`. Add a new
property with the correct spelling. Keep the old one for compatibility.
Issue: #21463
That fixes Emacs 29 warning:
cmake-mode.el:186:48: Warning: ‘point-at-bol’ is an obsolete function
(as of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ instead.
With `lexical-binding: t`, the `end` variable is undefined in
`cmake--syntax-propertize-until-bracket-close`, causing syntax
highlighting errors. This fixes that by passing `end` from the caller.
This applies a similar modernization as was done in 1ff41ba26e
(Auxiliary: bash-completion: use _comp_initialize, 2024-06-02)
for the cmake executable. The _init_completion function was
deprecated upstream in bash-completion 2.12.
This change was spawned by the desire to use `narrow-to-defun` in CMake
files. However, there was no "CMake version" of that function, and it
turns out that we don't need one if we make `beginning-of-defun` and
`end-of-defun` work in `cmake-mode`.
In the setup code of `cmake-mode` we now set the local variables
`beginning-of-defun-function` and `end-of-defun-function`. This makes
`beginning-of-defun` and `end-of-defun` work as expected.
Functions that use this facility also work now: `mark-defun` and
`narrow-to-defun` and possibly others.
We remove `cmake-mark-defun` since it's superfluous now.
We remove the defun-related key bindings since the standard functions
that are bound globally work fine with this patch.
* Per-config values were added to `AUTO*_EXECUTABLE`.
* Dependency order was refactored for `cmake_autogen` and `cmake_autorcc` to avoid unnecessary rebuilds.
* A new parameter was added for `cmake_autogen` and `cmake_autorcc` to specify the config name of the `auto*_executable` to be used.
* Add `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` target property to change the behavior of the dependency graph.
* The timestamp target is split into three targets for per-config to avoid redundant `mocs_compilation` builds when `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` is ON
* Per-config `DEP_FILE_RULE_NAME` values were added to `AutogenInfo.json` for `Multi-Config` usage.
* Some functions were refactored to avoid code duplication.
This commit reimplements fddd0f0443Fixes: #20074
The cmake.vim file is generated by scanning for keyword-like
strings in the docs. Update the corresponding wrong entry
there too directly for now, which will fix the wrong entry until
the next full regeneration of the file.
Fixes: #25503
This resets `inde` (`indentexpr`) and `indk` (`indentkeys`) to the
global values when closing. Upstream `vim` updated their indentation
scripts in April 2022 to add this.
0f80101b73 Tests: Update Swift tests to use CMP0157 NEW behavior
c1d787e473 Swift: Add abstraction for compilation mode
c39384f540 Tests: Simplify RunCMake.Swift conditions to enable use of Swift
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8918
Add a `CMAKE_Swift_COMPILATION_MODE` variable and corresponding
`Swift_COMPILATION_MODE` target property to control the compilation
mode. Select among `wholemodule`, `singlefile`, and `incremental`.
Add policy CMP0157 to remove the default `-wmo` flags in favor of the
abstract setting.
Issue: #25366
The `SKIP_LINTING` source property was added to disable code check for
desired source files. The `SKIP_LINTING`includes `cpplint`, `clang-tidy`, \
`cppcheck` and `include-what-you-use`. If `SKIP_LINTING` is set on a
source file, the tools mentioned above will not be run on that source file.
7bf4e30090 Autogen: Default AUTOGEN_USE_SYSTEM_INCLUDE to ON if it is not set
033dc7ee2f Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target property
8ba16db163 Tests/RunCMake: Add option for dynamic expected output
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8400
`AUTOGEN_USE_SYSTEM_INCLUDE` was added. `AUTOGEN_USE_SYSTEM_INCLUDE`
is a boolean property that can be set on a target to indicate that the
autogen target include directory should be added as a system include
directory or normal include directory to the target.
Add this target property to specify macro names that propagate to
dependents as `AUTOMOC_MACRO_NAMES`. The dependents will automatically
generate MOC files for source files that contain the inherited macro
names.
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
Fixes: #19679