Skip to content

Commit ec1f98f

Browse files
committed
change: cmake: change style to set indent 4
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
1 parent 09586f0 commit ec1f98f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.cmakelintrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# project has long lines
22
filter=-linelength
3+
spaces=4

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ max_line_length = 99
1919
[{**.yml, **.yaml, **.jinja}]
2020
indent_style = space
2121
indent_size = 4
22+
23+
[{CMakeLists.txt,**.cmake}]
24+
indent_style = space
25+
indent_size = 4

docs/manual/developer/04_style_guide.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,11 @@ or
508508

509509
## CMake
510510

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

516517
## Markup Languages
517518

0 commit comments

Comments
 (0)