-
Notifications
You must be signed in to change notification settings - Fork 205
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: Apply cmake-format #615
Conversation
701039a
to
1337011
Compare
1337011
to
11ab110
Compare
if( | ||
MINGW | ||
OR CYGWIN | ||
OR WIN32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is extremely ugly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I re-added the corresponding file from gnuradio and the result is almost the same but without the new line after if(
. I'd assume this is intended.
set( | ||
CMAKE_C_FLAGS | ||
${CMAKE_CXX_FLAGS} | ||
CACHE STRING "" FORCE) #same flags for C sources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, but this looks pretty different than GR's formatting. You're closing an issue that says "format like GNU Radio" with this!
If you want to be close to the GNU Radio version, so go and copy the GNU Radio version, I'd say. |
I'm pretty sure, I did. I saw you @marcusmueller made some further adjustments to the GR CMake formatting. I should probably get an updated version of this. |
We want to use this to auto-format our cmake files. Signed-off-by: Johannes Demel <[email protected]>
Run: ``` cmake-format -c .cmake-format.py -i $(git ls-files | grep CMakeLists.txt) $(git ls-files cmake/ | grep .cmake) ``` This applies the cmake formatting as defined in all files. In order to install `cmake-format`, you might want to run `pip install cmakelang` Or use another package manager of your choice. Signed-off-by: Johannes Demel <[email protected]>
11ab110
to
e165c92
Compare
I copied the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good; thanks!
cmake: Apply cmake-format
This commit adds
.cmake-format.py
. It is mostly inspired by the GNU Radio version of it.Steps to reproduce these results:
pip3 install cmakelang
cmake-format --dump-config python > .cmake-format.py
cmake-format -c .cmake-format.py -i $(git ls-files | grep CMakeLists.txt) $(git ls-files | grep .cmake)
Fixes #600
Fixes #423