cmake: enable -pedantic-errors for clang when CURL_WERROR=ON#13286
Closed
vszakats wants to merge 3 commits intocurl:masterfrom
Closed
cmake: enable -pedantic-errors for clang when CURL_WERROR=ON#13286vszakats wants to merge 3 commits intocurl:masterfrom
-pedantic-errors for clang when CURL_WERROR=ON#13286vszakats wants to merge 3 commits intocurl:masterfrom
Conversation
`-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
3e7c7b5 to
d956cbd
Compare
bagder
approved these changes
Apr 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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