filipdutescu/modern-cpp-template

[FEATURE] add .cmake-format config file and use cmake-format please

ClausKlein opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
IMHO: A template project with cmake files should be clean of cmake-lint problems

Describe the solution you'd like
Add a .cmake-format config file to your project root:

format:
  dangle_parens: true
  keyword_case: upper
  line_ending: unix
  line_width: 120
  max_lines_hwrap: 3
  max_pargs_hwrap: 8
  max_rows_cmdline: 3
  max_subgroups_hwrap: 4
  min_prefix_chars: 8
  separate_ctrl_name_with_space: false
  separate_fn_name_with_space: false
  tab_size: 2

markup:
  bullet_char: '*'
  enum_char: .
  enable_markup: false

Provide usage examples

  • cmake-format -i cmake/*.cmake
  • cmake-lint cmake/*.cmake

Additional context
you may also use this:
https://github.com/TheLartians/Format.cmake#how-to-integrate

Hello, you are perfectly right, thanks for providing me with a template and guidance on how to implement this! I really like the idea and will work on integrating it.