Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 1 | # Generated with cmake-format 0.6.13 |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 2 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 3 | # ---------------------------------- |
| 4 | # Options affecting listfile parsing |
| 5 | # ---------------------------------- |
| 6 | with section("parse"): |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 7 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 8 | # Specify structure for custom cmake functions |
| 9 | additional_commands = {} |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 10 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 11 | # Override configurations per-command where available |
| 12 | override_spec = {} |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 13 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 14 | # Specify variable tags. |
| 15 | vartags = [] |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 16 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 17 | # Specify property tags. |
| 18 | proptags = [] |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 19 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 20 | # ----------------------------- |
| 21 | # Options affecting formatting. |
| 22 | # ----------------------------- |
| 23 | with section("format"): |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 24 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 25 | # Disable formatting entirely, making cmake-format a no-op |
| 26 | disable = False |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 27 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 28 | # How wide to allow formatted cmake files |
| 29 | line_width = 80 |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 30 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 31 | # How many spaces to tab for indent |
| 32 | tab_size = 2 |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 33 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 34 | # If true, lines are indented using tab characters (utf-8 0x09) instead of |
| 35 | # <tab_size> space characters (utf-8 0x20). In cases where the layout would |
| 36 | # require a fractional tab character, the behavior of the fractional |
| 37 | # indentation is governed by <fractional_tab_policy> |
| 38 | use_tabchars = False |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 39 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 40 | # If <use_tabchars> is True, then the value of this variable indicates how |
| 41 | # fractional indentions are handled during whitespace replacement. If set to |
| 42 | # 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set |
| 43 | # to `round-up` fractional indentation is replaced with a single tab character |
| 44 | # (utf-8 0x09) effectively shifting the column to the next tabstop |
| 45 | fractional_tab_policy = 'use-space' |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 46 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 47 | # If an argument group contains more than this many sub-groups (parg or kwarg |
| 48 | # groups) then force it to a vertical layout. |
| 49 | max_subgroups_hwrap = 2 |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 50 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 51 | # If a positional argument group contains more than this many arguments, then |
| 52 | # force it to a vertical layout. |
| 53 | max_pargs_hwrap = 6 |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 54 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 55 | # If a cmdline positional group consumes more than this many lines without |
| 56 | # nesting, then invalidate the layout (and nest) |
| 57 | max_rows_cmdline = 2 |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 58 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 59 | # If true, separate flow control names from their parentheses with a space |
| 60 | separate_ctrl_name_with_space = False |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 61 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 62 | # If true, separate function names from parentheses with a space |
| 63 | separate_fn_name_with_space = False |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 64 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 65 | # If a statement is wrapped to more than one line, than dangle the closing |
| 66 | # parenthesis on its own line. |
| 67 | dangle_parens = False |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 68 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 69 | # If the trailing parenthesis must be 'dangled' on its on line, then align it |
| 70 | # to this reference: `prefix`: the start of the statement, `prefix-indent`: |
| 71 | # the start of the statement, plus one indentation level, `child`: align to |
| 72 | # the column of the arguments |
| 73 | dangle_align = 'prefix' |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 74 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 75 | # If the statement spelling length (including space and parenthesis) is |
| 76 | # smaller than this amount, then force reject nested layouts. |
| 77 | min_prefix_chars = 4 |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 78 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 79 | # If the statement spelling length (including space and parenthesis) is larger |
| 80 | # than the tab width by more than this amount, then force reject un-nested |
| 81 | # layouts. |
| 82 | max_prefix_chars = 10 |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 83 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 84 | # If a candidate layout is wrapped horizontally but it exceeds this many |
| 85 | # lines, then reject the layout. |
| 86 | max_lines_hwrap = 2 |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 87 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 88 | # What style line endings to use in the output. |
| 89 | line_ending = 'unix' |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 90 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 91 | # Format command names consistently as 'lower' or 'upper' case |
| 92 | command_case = 'lower' |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 93 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 94 | # Format keywords consistently as 'lower' or 'upper' case |
| 95 | keyword_case = 'unchanged' |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 96 | |
Marvin Scholz | caa1ff8 | 2021-09-01 15:21:45 +0200 | [diff] [blame] | 97 | # A list of command names which should always be wrapped |
| 98 | always_wrap = [] |
| 99 | |
| 100 | # If true, the argument lists which are known to be sortable will be sorted |
| 101 | # lexicographicall |
| 102 | enable_sort = True |
| 103 | |
| 104 | # If true, the parsers may infer whether or not an argument list is sortable |
| 105 | # (without annotation). |
| 106 | autosort = False |
| 107 | |
| 108 | # By default, if cmake-format cannot successfully fit everything into the |
| 109 | # desired linewidth it will apply the last, most agressive attempt that it |
| 110 | # made. If this flag is True, however, cmake-format will print error, exit |
| 111 | # with non-zero status code, and write-out nothing |
| 112 | require_valid_layout = False |
| 113 | |
| 114 | # A dictionary mapping layout nodes to a list of wrap decisions. See the |
| 115 | # documentation for more information. |
| 116 | layout_passes = {} |
| 117 | |
| 118 | # ------------------------------------------------ |
| 119 | # Options affecting comment reflow and formatting. |
| 120 | # ------------------------------------------------ |
| 121 | with section("markup"): |
| 122 | |
| 123 | # What character to use for bulleted lists |
| 124 | bullet_char = '*' |
| 125 | |
| 126 | # What character to use as punctuation after numerals in an enumerated list |
| 127 | enum_char = '.' |
| 128 | |
| 129 | # If comment markup is enabled, don't reflow the first comment block in each |
| 130 | # listfile. Use this to preserve formatting of your copyright/license |
| 131 | # statements. |
| 132 | first_comment_is_literal = False |
| 133 | |
| 134 | # If comment markup is enabled, don't reflow any comment block which matches |
| 135 | # this (regex) pattern. Default is `None` (disabled). |
| 136 | literal_comment_pattern = None |
| 137 | |
| 138 | # Regular expression to match preformat fences in comments default= |
| 139 | # ``r'^\s*([`~]{3}[`~]*)(.*)$'`` |
| 140 | fence_pattern = '^\\s*([`~]{3}[`~]*)(.*)$' |
| 141 | |
| 142 | # Regular expression to match rulers in comments default= |
| 143 | # ``r'^\s*[^\w\s]{3}.*[^\w\s]{3}$'`` |
| 144 | ruler_pattern = '^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$' |
| 145 | |
| 146 | # If a comment line matches starts with this pattern then it is explicitly a |
| 147 | # trailing comment for the preceeding argument. Default is '#<' |
| 148 | explicit_trailing_pattern = '#<' |
| 149 | |
| 150 | # If a comment line starts with at least this many consecutive hash |
| 151 | # characters, then don't lstrip() them off. This allows for lazy hash rulers |
| 152 | # where the first hash char is not separated by space |
| 153 | hashruler_min_length = 10 |
| 154 | |
| 155 | # If true, then insert a space between the first hash char and remaining hash |
| 156 | # chars in a hash ruler, and normalize its length to fill the column |
| 157 | canonicalize_hashrulers = True |
| 158 | |
| 159 | # enable comment markup parsing and reflow |
| 160 | enable_markup = True |
| 161 | |
| 162 | # ---------------------------- |
| 163 | # Options affecting the linter |
| 164 | # ---------------------------- |
| 165 | with section("lint"): |
| 166 | |
| 167 | # a list of lint codes to disable |
| 168 | disabled_codes = [] |
| 169 | |
| 170 | # regular expression pattern describing valid function names |
| 171 | function_pattern = '[0-9a-z_]+' |
| 172 | |
| 173 | # regular expression pattern describing valid macro names |
| 174 | macro_pattern = '[0-9A-Z_]+' |
| 175 | |
| 176 | # regular expression pattern describing valid names for variables with global |
| 177 | # (cache) scope |
| 178 | global_var_pattern = '[A-Z][0-9A-Z_]+' |
| 179 | |
| 180 | # regular expression pattern describing valid names for variables with global |
| 181 | # scope (but internal semantic) |
| 182 | internal_var_pattern = '_[A-Z][0-9A-Z_]+' |
| 183 | |
| 184 | # regular expression pattern describing valid names for variables with local |
| 185 | # scope |
| 186 | local_var_pattern = '[a-z][a-z0-9_]+' |
| 187 | |
| 188 | # regular expression pattern describing valid names for privatedirectory |
| 189 | # variables |
| 190 | private_var_pattern = '_[0-9a-z_]+' |
| 191 | |
| 192 | # regular expression pattern describing valid names for public directory |
| 193 | # variables |
| 194 | public_var_pattern = '[A-Z][0-9A-Z_]+' |
| 195 | |
| 196 | # regular expression pattern describing valid names for function/macro |
| 197 | # arguments and loop variables. |
| 198 | argument_var_pattern = '[a-z][a-z0-9_]+' |
| 199 | |
| 200 | # regular expression pattern describing valid names for keywords used in |
| 201 | # functions or macros |
| 202 | keyword_pattern = '[A-Z][0-9A-Z_]+' |
| 203 | |
| 204 | # In the heuristic for C0201, how many conditionals to match within a loop in |
| 205 | # before considering the loop a parser. |
| 206 | max_conditionals_custom_parser = 2 |
| 207 | |
| 208 | # Require at least this many newlines between statements |
| 209 | min_statement_spacing = 1 |
| 210 | |
| 211 | # Require no more than this many newlines between statements |
| 212 | max_statement_spacing = 2 |
| 213 | max_returns = 6 |
| 214 | max_branches = 12 |
| 215 | max_arguments = 5 |
| 216 | max_localvars = 15 |
| 217 | max_statements = 50 |
| 218 | |
| 219 | # ------------------------------- |
| 220 | # Options affecting file encoding |
| 221 | # ------------------------------- |
| 222 | with section("encode"): |
| 223 | |
| 224 | # If true, emit the unicode byte-order mark (BOM) at the start of the file |
| 225 | emit_byteorder_mark = False |
| 226 | |
| 227 | # Specify the encoding of the input file. Defaults to utf-8 |
| 228 | input_encoding = 'utf-8' |
| 229 | |
| 230 | # Specify the encoding of the output file. Defaults to utf-8. Note that cmake |
| 231 | # only claims to support utf-8 so be careful when using anything else |
| 232 | output_encoding = 'utf-8' |
| 233 | |
| 234 | # ------------------------------------- |
| 235 | # Miscellaneous configurations options. |
| 236 | # ------------------------------------- |
| 237 | with section("misc"): |
| 238 | |
| 239 | # A dictionary containing any per-command configuration overrides. Currently |
| 240 | # only `command_case` is supported. |
| 241 | per_command = {} |