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

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 jzakrzewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me.

@MarcelRaad MarcelRaad deleted the cmake_fix_warning_suppressions branch July 23, 2020 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants