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

Correct logic for -Wno-unknown-warning-option #58523

Merged
merged 2 commits into from
Jun 20, 2022

Conversation

perryprog
Copy link
Contributor

Summary

None

Purpose of change

It looks like both Apple-Clang and LLVM Clang use -Wno-unknown-warning-option instead of -Wno-unknown-warning, so #57984 broke compilation (at least for my setup) due to its CMAKE_CXX_COMPILER_ID being AppleClang.

Describe the solution

This updates the logic from b1e5ada to match for both AppleClang and Clang (see https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html).

Describe alternatives you've considered

It'd probably also be possible to just add both -Wno-unknown-warning and -Wno-unknown-warning-option and hope that that works, but this seems a bit safer.

Testing

Compilation worked fine on my machine, hoping that CI catches any other issues. @alef, if possible could you also confirm that this looks okay for what you were going for?

Additional context

See also #57984.

It looks like both AppleClang and LLVM Clang use
-Wno-unknown-warning-option instead of -Wno-unknown-warning, so this
updates the logic from b1e5ada to match that. It'd probably also be
possible to just add both -Wno-unknown-warning and
-Wno-unknown-warning-option, but who knows.
@github-actions github-actions bot added Code: Build Issues regarding different builds and build environments astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jun 18, 2022
CMakeLists.txt Outdated Show resolved Hide resolved
Co-authored-by: Jianxiang Wang (王健翔) <qrox@sina.com>
@NetSysFire NetSysFire added the OS: macOS Issues related to macOS / OSX operating system label Jun 19, 2022
@dseguin dseguin merged commit cb3447c into CleverRaven:master Jun 20, 2022
@perryprog perryprog deleted the Wmaybe-warning-option branch June 20, 2022 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Code: Build Issues regarding different builds and build environments json-styled JSON lint passed, label assigned by github actions OS: macOS Issues related to macOS / OSX operating system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants