.cmake-format.py 1.5 KB

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