Closed tawmoto closed 4 years ago
Sounds like you are looking for https://cmake-format.readthedocs.io/en/latest/configopts.html#separate-ctrl-name-with-space
Sounds like you are looking for https://cmake-format.readthedocs.io/en/latest/configopts.html#separate-ctrl-name-with-space
I set this option as true
. Shouldn't this apply for flow-control stuff like if/else
?
What I want: to have if/else
with space, but functions without space.
Sorry, the documentation is great but sometimes they lack examples and is not clear exactly what an option does.
test.cmake:
if(FOO AND BAR)
dothing()
endif()
cmake-format --separate-ctrl-name-with-space=true /tmp/test.cmake
:
if (FOO AND BAR)
dothing()
endif ()
cmake-format --separate-ctrl-name-with-space=false /tmp/test.cmake
if(FOO AND BAR)
dothing()
endif()
sometimes they lack examples and is not clear exactly what an option does.
Yeah, I would like to add examples as I think they would help illustrate the usage for these but I haven't had the time.
Does this example illustrate what you're looking for? Any further questions?
Hi @cheshirekow , thanks for for the moment we will postpone cmake-format integration in our company project, we still have to analyze some corner cases. I hope I will get back to it soon.
Hi,
I run this command
And I see that it adds a space between function name and the parantheses, which seems wrong, I just want space between control flow names.
Am I doing something wrong? Thanks