CMake: fix excessive build warnings when building with clang-cl
This commit is contained in:
parent
0dabbd4ed7
commit
2d34062836
@ -26,7 +26,12 @@ macro(ADD_ZSTD_COMPILATION_FLAGS)
|
|||||||
EnableCompilerFlag("-std=c++11" false true)
|
EnableCompilerFlag("-std=c++11" false true)
|
||||||
#Set c99 by default
|
#Set c99 by default
|
||||||
EnableCompilerFlag("-std=c99" true false)
|
EnableCompilerFlag("-std=c99" true false)
|
||||||
|
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)
|
EnableCompilerFlag("-Wall" true true)
|
||||||
|
endif ()
|
||||||
EnableCompilerFlag("-Wextra" true true)
|
EnableCompilerFlag("-Wextra" true true)
|
||||||
EnableCompilerFlag("-Wundef" true true)
|
EnableCompilerFlag("-Wundef" true true)
|
||||||
EnableCompilerFlag("-Wshadow" true true)
|
EnableCompilerFlag("-Wshadow" true true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user