Skip to content

Conversation

SquallATF
Copy link

This PR fixes the warning flags when building with clang-cl.

Previously, the CMake configuration unconditionally added -Wall -Wextra for Clang. However, according to the clang-cl documentation, /Wall in clang-cl is mapped to -Weverything, which enables all possible warnings, far more than MSVC’s /Wall. This results in a flood of warnings that are not intended.

The original intent was to match MSVC /W4 (≈ -Wall -Wextra in GCC/Clang).

This PR fixes the warning flags when building with **clang-cl**.

Previously, the CMake configuration unconditionally added `-Wall -Wextra` for Clang.
However, according to the [clang-cl documentation](https://clang.llvm.org/docs/UsersManual.html#clang-cl), `/Wall` in clang-cl is mapped to `-Weverything`, which enables **all possible warnings**, far more than MSVC’s `/Wall`. This results in a flood of warnings that are not intended.

The original intent was to match MSVC `/W4` (≈ `-Wall -Wextra` in GCC/Clang).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant