Skip to content

cmake: enable -pedantic-errors for clang when CURL_WERROR=ON #13286

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

Closed
wants to merge 3 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Apr 4, 2024

clang doesn't have the issues of GCC and old CMake versions.

Note: This introduces asymmetry with autotools, which only enables
this for GCC.

Closes #13286

@github-actions github-actions bot added the CI Continuous Integration label Apr 4, 2024
vszakats added 3 commits April 5, 2024 09:32
`-pedantic-errors` option throws a warning with GCC (all versions) in
`check_symbol_exists()`, which makes feature checks fail. CMake v3.23.0
(2022-03-29) introduced a workaround:

https://gitlab.kitware.com/cmake/cmake/-/issues/13208
https://gitlab.kitware.com/cmake/cmake/-/commit/eeb45401163d831b8c841ef6eba81466b4067b68
https://gitlab.kitware.com/cmake/cmake/-/commit/1ab7c3cd28b27ca162c4559e1026e5cad1898ade

Make sure to not enable this option for CMake versions older than that.

Follow-up to 3829759 curl#12489
clang doesn't have the issues of GCC and old CMake versions.

Note: This introduces asymmetry with autotools, which only enables
this for GCC.

Closes #xxxxx
@vszakats vszakats force-pushed the cmake-pedantic-clang branch from 3e7c7b5 to d956cbd Compare April 5, 2024 09:33
@vszakats vszakats closed this in 11d27cf Apr 5, 2024
@vszakats vszakats deleted the cmake-pedantic-clang branch April 5, 2024 13:07
vszakats added a commit to vszakats/curl that referenced this pull request Jul 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Follow-up to 11d27cf curl#13286
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build CI Continuous Integration cmake
Development

Successfully merging this pull request may close these issues.

None yet

2 participants