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

CMake: Style fixes #2727

Closed
wants to merge 1 commit into from
Closed

CMake: Style fixes #2727

wants to merge 1 commit into from

Conversation

ruslo
Copy link
Contributor

@ruslo ruslo commented Jul 10, 2018

No description provided.

@bagder bagder added the cmake label Jul 10, 2018
@snikulov
Copy link
Member

@ruslo Could you please squash your changes into a single commit?
Commit message also should be updated to

cmake: style fixes [according to link to style guide?]

Also, it would be great to provide a link to cmake style guide your using

Thank you.

@ruslo
Copy link
Contributor Author

ruslo commented Jul 16, 2018

Could you please squash your changes into a single commit?

For review reason I made a few small commits, but if you want to squash them anyway you can do it using GitHub:
image

it would be great to provide a link to cmake style guide your using

I was not using any guide, I just made syntax consistent. E.g. currently in master most of the CMake code is lower-case, no tabs and if(A) ... endif() instead of if(A) ... endif(A):

  • curl/CMakeLists.txt

    Lines 93 to 104 in 092f681

    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
    if (PICKY_COMPILER)
    foreach (_CCOPT -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wundef -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wno-sign-conversion -Wvla -Wdouble-promotion -Wno-system-headers)
    # surprisingly, CHECK_C_COMPILER_FLAG needs a new variable to store each new
    # test result in.
    CHECK_C_COMPILER_FLAG(${_CCOPT} OPT${_CCOPT})
    if(OPT${_CCOPT})
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_CCOPT}")
    endif()
    endforeach()
    endif()
    endif()

@snikulov
Copy link
Member

@ruslo Thanks for the tip.
But for review reasons, it is better to provide small changes with clear descriptions as described here.

While I'm not objecting in general for those changes, the clear description should be provided.
If no guide used, why you name it - style fixes? The whole commit could be named as cmake: update scripts to use consistent style

@ruslo
Copy link
Contributor Author

ruslo commented Jul 17, 2018

Could you please squash your changes into a single commit?

Squashed into one commit

The whole commit could be named as cmake: update scripts to use consistent style

Renamed

@snikulov snikulov self-requested a review July 17, 2018 09:50
@snikulov
Copy link
Member

LGTM

@bagder
Copy link
Member

bagder commented Jul 17, 2018

Thanks!

@bagder bagder closed this in d1207c0 Jul 17, 2018
@ruslo ruslo deleted the pr.cmake.style branch July 17, 2018 13:24
xquery pushed a commit to xquery/curl that referenced this pull request Aug 9, 2018
falconindy pushed a commit to falconindy/curl that referenced this pull request Sep 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Oct 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants