Fix for excessive compiler warnings when building with clang-cl#2600
Merged
terrelln merged 2 commits intofacebook:devfrom May 6, 2021
Merged
Fix for excessive compiler warnings when building with clang-cl#2600terrelln merged 2 commits intofacebook:devfrom
terrelln merged 2 commits intofacebook:devfrom
Conversation
Contributor
|
Thanks for the PR @nickhutchinson! I love the added Appveyor test! |
terrelln
reviewed
May 5, 2021
| if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" OR MINGW) #Not only UNIX but also WIN32 for MinGW | ||
| #Not only UNIX but also WIN32 for MinGW | ||
| if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR | ||
| (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT MSVC) OR |
Contributor
There was a problem hiding this comment.
If only -Wall is the problem, could you only turn off -Wall for clang-cl. E.g. leave this if as-is and do:
if (NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND MSVC))
EnableCompilerFlag("-Wall" true true)
endif ()
terrelln
approved these changes
May 6, 2021
Contributor
terrelln
left a comment
There was a problem hiding this comment.
LGTM, thanks for making that change! I'll merge once the tests all pass.
Merged
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.
Updates CMake build to pass
/clang:-Wallinstead of-Wallwhen clang-cl is used. clang-cl accepts many arguments supported by either MSVC and Clang, but when they conflict, interprets them as MSVC would. In this instance,-Wallwas being mapped to-Weverythingand enabling every available warning.Also adds clang-cl Appveyor build jobs.
Fixes #2448