1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

Merge pull request #2600 from nickhutchinson/clang-cl

Fix for excessive compiler warnings when building with clang-cl
This commit is contained in:
Nick Terrell
2021-05-06 12:43:15 -07:00
committed by GitHub
2 changed files with 42 additions and 1 deletions

View File

@ -26,7 +26,12 @@ macro(ADD_ZSTD_COMPILATION_FLAGS)
EnableCompilerFlag("-std=c++11" false true)
#Set c99 by default
EnableCompilerFlag("-std=c99" true false)
EnableCompilerFlag("-Wall" true true)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND MSVC)
# clang-cl normally maps -Wall to -Weverything.
EnableCompilerFlag("/clang:-Wall" true true)
else ()
EnableCompilerFlag("-Wall" true true)
endif ()
EnableCompilerFlag("-Wextra" true true)
EnableCompilerFlag("-Wundef" true true)
EnableCompilerFlag("-Wshadow" true true)