@@ -33,11 +33,12 @@ ecosystem.
3333 * [ 9.1. Determining processor] ( #91-determining-processor )
3434* [ 10. See also] ( #10-see-also )
3535 * [ 10.1. Tools] ( #101-tools )
36- * [ 10.1.1. cmake-format (by cmakelang project)] ( #1011-cmake-format-by-cmakelang-project )
37- * [ 10.1.2. cmake-lint (by cmakelang project)] ( #1012-cmake-lint-by-cmakelang-project )
38- * [ 10.1.3. cmakelint] ( #1013-cmakelint )
39- * [ 10.1.4. bin/check-cmake.sh] ( #1014-bincheck-cmakesh )
40- * [ 10.1.5. cmake-format.json] ( #1015-cmake-formatjson )
36+ * [ 10.1.1. Gersemi] ( #1011-gersemi )
37+ * [ 10.1.2. cmake-format (by cmakelang project)] ( #1012-cmake-format-by-cmakelang-project )
38+ * [ 10.1.3. cmake-lint (by cmakelang project)] ( #1013-cmake-lint-by-cmakelang-project )
39+ * [ 10.1.4. cmakelint] ( #1014-cmakelint )
40+ * [ 10.1.5. bin/check-cmake.php] ( #1015-bincheck-cmakephp )
41+ * [ 10.1.6. cmake-format.json] ( #1016-cmake-formatjson )
4142 * [ 10.2. Further resources] ( #102-further-resources )
4243
4344## 1. Introduction
@@ -607,7 +608,16 @@ levels of maturity and a lack of updates to keep pace with new CMake versions.
607608It's worth mentioning that this recommendation may evolve in the future as these
608609tools continue to develop and adapt.
609610
610- #### 10.1.1. cmake-format (by cmakelang project)
611+ #### 10.1.1. Gersemi
612+
613+ The [ ` gersemi ` ] ( https://github.com/BlankSpruce/gersemi ) tool can check and fix
614+ CMake code style:
615+
616+ ``` sh
617+ gersemi --check --indent 2 --diff --definitions cmake -- cmake
618+ ```
619+
620+ #### 10.1.2. cmake-format (by cmakelang project)
611621
612622The [ ` cmake-format ` ] ( https://cmake-format.readthedocs.io/en/latest/ ) tool can
613623find formatting issues and sync the CMake code style:
@@ -636,7 +646,7 @@ dumping the formatted content to stdout:
636646cmake-format -i path/to/cmake/file
637647```
638648
639- #### 10.1.2 . cmake-lint (by cmakelang project)
649+ #### 10.1.3 . cmake-lint (by cmakelang project)
640650
641651The [ ` cmake-lint ` ] ( https://cmake-format.readthedocs.io/en/latest/cmake-lint.html )
642652tool is part of the cmakelang project and can help with linting CMake files:
@@ -648,7 +658,7 @@ cmake-lint <cmake/CMakeLists.txt cmake/...>
648658This tool can also utilize the ` cmake-format.[json|py|yaml] ` file using the ` -c `
649659option.
650660
651- #### 10.1.3 . cmakelint
661+ #### 10.1.4 . cmakelint
652662
653663For linting there is also a separate and useful
654664[ cmakelint] ( https://github.com/cmake-lint/cmake-lint ) tool which similarly lints
@@ -658,22 +668,22 @@ and helps to better structure CMake files:
658668cmakelint < cmake/CMakeLists.txt cmake/...>
659669```
660670
661- #### 10.1.4 . bin/check-cmake.sh
671+ #### 10.1.5 . bin/check-cmake.php
662672
663673For convenience there is a custom helper script added to this repository that
664674checks CMake files:
665675
666676``` sh
667- ./bin/check-cmake.sh
677+ ./bin/check-cmake.php cmake
668678```
669679
670- #### 10.1.5 . cmake-format.json
680+ #### 10.1.6 . cmake-format.json
671681
672682The ` cmake-format.json ` file is used to configure how ` cmake-lint ` and
673683` cmake-format ` tools work.
674684
675685There is ` bin/cmake-format.json ` added to this repository and is used by the
676- custom ` bin/check-cmake.sh ` script. It includes only changed configuration
686+ custom ` bin/check-cmake.php ` script. It includes only changed configuration
677687values from the upstream defaults.
678688
679689* ` disabled_codes `
0 commit comments