Skip to content

Commit

Permalink
format cmake files
Browse files Browse the repository at this point in the history
  • Loading branch information
pca006132 committed Oct 3, 2024
1 parent cc1e974 commit d1fc846
Show file tree
Hide file tree
Showing 11 changed files with 326 additions and 321 deletions.
37 changes: 37 additions & 0 deletions .cmake-format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# -----------------------------
# Options effecting formatting.
# -----------------------------
with section("format"):

# How wide to allow formatted cmake files
line_width = 80

# How many spaces to tab for indent
tab_size = 2

# If true, separate flow control names from their parentheses with a space
separate_ctrl_name_with_space = False

# If true, separate function names from parentheses with a space
separate_fn_name_with_space = False

# If a statement is wrapped to more than one line, than dangle the closing
# parenthesis on its own line.
dangle_parens = False

with section("markup"):
enable_markup = False

# parse kwargs for nanobind_add_stub, to not interpret keywords as args
with section("parse"):
additional_commands = {
"nanobind_add_stub": {
"kwargs": {
"MODULE": "*",
"OUTPUT": "*",
"PYTHON_PATH": "*",
"DEPENDS": "*",
"PATTERN_FILE": "*",
}
}
}
Loading

0 comments on commit d1fc846

Please sign in to comment.