pinocchio icon indicating copy to clipboard operation
pinocchio copied to clipboard

[cmake] Change formatting of listfiles to use gersemi, remove cmake-format

Open ManifoldFR opened this issue 9 months ago • 4 comments

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.

ManifoldFR avatar Feb 12 '25 19:02 ManifoldFR

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.

jcarpent avatar Feb 13 '25 09:02 jcarpent

I will handle the merging ;)

jcarpent avatar Feb 13 '25 09:02 jcarpent

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).

jorisv avatar Feb 13 '25 10:02 jorisv

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 😃

ManifoldFR avatar Feb 13 '25 10:02 ManifoldFR