-
Notifications
You must be signed in to change notification settings - Fork 430
/
.cmake-format.py
48 lines (36 loc) · 1.49 KB
/
.cmake-format.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# ----------------------------------
# Options affecting listfile parsing
# ----------------------------------
#with section("parse"):
## Specify structure for custom cmake functions
#additional_commands = { 'foo': { 'flags': ['BAR', 'BAZ'],
# 'kwargs': {'DEPENDS': '*', 'HEADERS': '*', 'SOURCES': '*'}}}
## Override configurations per-command where available
#override_spec = {}
## Specify variable tags.
#vartags = []
## Specify property tags.
#proptags = []
# -----------------------------
# Options affecting formatting.
# -----------------------------
with section("format"):
# If an argument group contains more than this many sub-groups (parg or kwarg
# groups) then force it to a vertical layout.
max_subgroups_hwrap = 2
# If a positional argument group contains more than this many arguments, then
# force it to a vertical layout.
max_pargs_hwrap = 2
# If a cmdline positional group consumes more than this many lines without
# nesting, then invalidate the layout (and nest)
max_rows_cmdline = 2
# Format keywords consistently as 'lower' or 'upper' case
keyword_case = 'upper'
# ------------------------------------------------
# Options affecting comment reflow and formatting.
# ------------------------------------------------
with section("markup"):
# If comment markup is enabled, don't reflow the first comment block in each
# listfile. Use this to preserve formatting of your copyright/license
# statements.
first_comment_is_literal = True