aboutsummaryrefslogtreecommitdiff
path: root/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'build/cmake/CMakeModules/AddZstdCompilationFlags.cmake')
-rw-r--r--build/cmake/CMakeModules/AddZstdCompilationFlags.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
index 62389717..e23b9d60 100644
--- a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
+++ b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
@@ -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)