cmake_format
cmake_format copied to clipboard
Align kwarg lists
(This is based on top of #35, so just look at the last commit. I can rebase if you like.)
This adds a config option to align lists of arguments across kwargs. It turns this:
HEADERS a.h
b.h
c.h
d.h
e.h
f.h
SOURCES a.cc b.cc d.cc
LONG_KWARG foo bar baz)
into this:
HEADERS a.h
b.h
c.h
d.h
e.h
f.h
SOURCES a.cc b.cc d.cc
LONG_KWARG foo bar baz)
It also interacts correctly with #35 if you want something like this:
HEADERS
a.h
b.h
c.h
d.h
e.h
f.h
SOURCES
a.cc b.cc d.cc
LONG_KWARG
foo bar baz)
I like the idea of supporting this, but I'll have to think about how to properly implement with the overhauled formatting logic.
It's been a long time since I've commented on this PR but I just wanted to mention that it's still on my queue. I think that there are definitely some cases where it makes a lot of sense e.g. ExternalProject_Add. Personally I don't think I would want it to apply all the time, so I'm thinking about the different config options to enable this. I will hopefully address this feature soon.
@cheshirekow any latest update on this feature request?
@dhruvkakadiya not yet, but it's pretty high up in the queue now.
@dhruvkakadiya not yet, but it's pretty high up in the queue now.
Thank you.. will look forward to it.