-
Notifications
You must be signed in to change notification settings - Fork 6
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
Inconsistent formatting of set command with favour-inlining enabled #18
Comments
This one is the funny one that perhaps I should revisit. In imaginary Python based system these two commands would be equivalent to: set(
name="CCACHE_SUPPORT",
value=["ON"],
cache="BOOL",
doc="Enable ccache support"
)
set(
name="uuid_token_lengths",
value=["8", "4", "4", "4", "12"],
cache=None,
doc=None
) I've made this arbitrary choice initially that |
I think I will close this one with an update to README and help. While Examples where it applies: set(FOO thing1 thing2 thing3 thing4)
set(FOO
thing1
thing2
thing3
thing4
thing5
)
list(APPEND FOO thing1 thing2 thing3 thing4)
list(
APPEND
FOO
thing1
thing2
thing3
thing4
thing5
)
add_library(FOO SHARED thing1 thing2 thing3 thing4)
add_library(
FOO
SHARED
thing1
thing2
thing3
thing4
thing5
) and where it doesn't: target_link_libraries(FOO PUBLIC thing1 thing2 thing3 thing4)
target_link_libraries(
FOO
PUBLIC thing1 thing2 thing3 thing4 thing5
) In hindsight I should have probably made What do you think? |
Probably best to document this to make it explicit that inline favouring will not apply to It's fine to have these arbitrary internal rules, though if documented they can cut down on issue reports like this one. |
With current master branch of gersemi I noticed that even with
favour-inlining
enabled some invocations of theset
command get split up into multiple lines.In my case the following invocation is kept on a single line:
set(CCACHE_SUPPORT ON CACHE BOOL "Enable ccache support")
Whereas the following invocation is split into multiple lines:
This happens even though the column limit is set to
120
, so the invocation should fit into a single line just fine.The text was updated successfully, but these errors were encountered: