pinocchio
pinocchio copied to clipboard
[cmake] Change formatting of listfiles to use gersemi, remove cmake-format
This PR removes the abandoned cmake-format to use the maintained gersemi. It also reformats all the CMake listfiles, picking up case-sensitive definitions from the jrl-cmakemodules and other listfiles in Pinocchio.
Should it possible to postpone this PR due to parallel developments? It will be hard to do the proper merging with Pinocchio 4 in preparation.
I will handle the merging ;)
Gersemi seem to well handle functions with optional arguments. The result is nice even without specifying the arguments in a config file (like we did in .cmake-format.yaml).
Gersemi seem to well handle functions with optional arguments. The result is nice even without specifying the arguments in a config file (like we did in .cmake-format.yaml).
Yes, the author of gersemi BlankSpruce did this deliberately to simplify the parsing logic. Users just have to write their functions/macros which use cmake_parse_arguments in a standard way and fulfill the "deal" in the README.
I've already used cmake_parse_arguments successfully in aligator to simplify some CMake functions and have them formatted cleanly. It works much better than what I could achieve with cmake-format.
@jcarpent we can wait for Pinocchio 4, sure 😃