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

Update cmake-format style #6861

Closed
assignUser opened this issue Oct 3, 2023 · 1 comment
Closed

Update cmake-format style #6861

assignUser opened this issue Oct 3, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@assignUser
Copy link
Collaborator

Description

I think it would make sense to create a custom cmake-format config as there are some interesting options that we could make use of. One is --max-pargs-hwrap 2 this leads to all positional arguments (e.g. files or libraries) to wrap to a vertical layout after 2 args as seen in the following example:

 target_link_libraries(
-  velox_memcpy_meter PRIVATE velox_common_base velox_exception velox_time
-                             Folly::folly gflags::gflags)
+  velox_memcpy_meter
+  PRIVATE velox_common_base
+          velox_exception
+          velox_time
+          Folly::folly
+          gflags::gflags)

This has the advantage that diffs that modify the linked libraries are much easier to read as each lib is on a separate line. There are likely more sensible options that we could add in addition to this.

cc @kgpai

@assignUser assignUser added the enhancement New feature or request label Oct 3, 2023
@assignUser assignUser changed the title Modify cmake format style Update cmake format style Oct 27, 2023
@assignUser assignUser changed the title Update cmake format style Update cmake-format style Oct 27, 2023
@assignUser
Copy link
Collaborator Author

Implemented in #9948

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant