Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

ManifoldFR
Copy link
Member

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.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Hi,
This is a reminder message to assign an extra build label to this Pull Request if needed.
By default, this PR will be build with minimal build options (URDF support and Python bindings)
The possible extra labels are:

  • build_collision (build Pinocchio with coal support)
  • build_casadi (build Pinocchio with CasADi support)
  • build_autodiff (build Pinocchio with CppAD support)
  • build_codegen (build Pinocchio with CppADCodeGen support)
  • build_extra (build Pinocchio with extra algorithms)
  • build_mpfr (build Pinocchio with Boost.Multiprecision support)
  • build_sdf (build Pinocchio with SDF parser)
  • build_accelerate (build Pinocchio with APPLE Accelerate framework support)
  • build_all (build Pinocchio with ALL the options stated above)

Thanks.
The Pinocchio development team.

@jcarpent
Copy link
Contributor

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 jcarpent marked this pull request as draft February 13, 2025 09:23
@jcarpent
Copy link
Contributor

I will handle the merging ;)

@jorisv
Copy link
Contributor

jorisv commented Feb 13, 2025

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

@ManifoldFR
Copy link
Member Author

ManifoldFR commented Feb 13, 2025

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 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants