Skip to content

Commit

Permalink
change: cmake: change style to set indent 4
Browse files Browse the repository at this point in the history
Set indent 4 in all:
- cmakelint
- editorconfig
- Style Guide

Selected 4 instead of 2 as most existing files use 4 as indent. Only
these somewhat external files used indent 2 / tab.
- cmake/CopyFiles.cmake
- cmake/FindPythonModule.cmake
- cmake/GNUInstallDirs.cmake
  • Loading branch information
maage committed May 28, 2023
1 parent 09586f0 commit ec1f98f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .cmakelintrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# project has long lines
filter=-linelength
spaces=4
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ max_line_length = 99
[{**.yml, **.yaml, **.jinja}]
indent_style = space
indent_size = 4

[{CMakeLists.txt,**.cmake}]
indent_style = space
indent_size = 4
3 changes: 2 additions & 1 deletion docs/manual/developer/04_style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,11 @@ or

## CMake

* Shall use 2-space indentation
* Shall use 4-space indentation
* Shall use lower case for commands
* Shall use commands, including `if` etc., without extra spaces before or after `(` and `)` (Eg. `command(<args>)`
* `endif`, `endforeach`, and similar commands shall not have any arguments
* Shall keep flowing `)` at same indentation as starting clause

## Markup Languages

Expand Down

0 comments on commit ec1f98f

Please sign in to comment.