filipdutescu / modern-cpp-template

A template for modern C++ projects using CMake, Clang-Format, CI, unit testing and more, with support for downstream inclusion.
The Unlicense
1.73k stars 215 forks source link

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

Open ClausKlein opened 2 years ago

ClausKlein commented 2 years ago

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

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

filipdutescu commented 2 years ago

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.