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: fix test for warning suppressions #5714

Closed

Conversation

@MarcelRaad
Copy link
Member

MarcelRaad commented Jul 23, 2020

GCC doesn't warn for unknown -Wno- options, except if there are other
warnings or errors [0]. This was problematic with CURL_WERROR as that
warning-as-error cannot be suppressed. Notably, this always happened
with -Wno-pedantic-ms-format when not targeting Windows. So test for
the positive form of the warning instead, which should always result in
a diagnostic if unknown.

[0] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

GCC doesn't warn for unknown `-Wno-` options, except if there are other
warnings or errors [0]. This was problematic with `CURL_WERROR` as that
warning-as-error cannot be suppressed. Notably, this always happened
with `-Wno-pedantic-ms-format` when not targeting Windows. So test for
the positive form of the warning instead, which should always result in
a diagnostic if unknown.

[0] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

Closes
Copy link
Contributor

jzakrzewski left a comment

Looks sensible to me.

@MarcelRaad MarcelRaad deleted the MarcelRaad:cmake_fix_warning_suppressions branch Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.