From 02440964e8e09bd58a70973b9ee4f8f1059246d7 Mon Sep 17 00:00:00 2001 From: Anton Danielsson Date: Mon, 5 Oct 2015 13:42:14 +0200 Subject: [PATCH] Changed MSVC warnings from Wall to W4 to avoid 10000+ warnings from stl/windows headers. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 911f3096..535e8e6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,11 @@ if (NOT HAVE_CXX_FLAG_STD_CXX11) endif() # Turn compiler warnings up to 11 -add_cxx_compiler_flag(-Wall) +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + add_cxx_compiler_flag(-W4) +else() + add_cxx_compiler_flag(-Wall) +endif() add_cxx_compiler_flag(-Wextra) add_cxx_compiler_flag(-Wshadow) add_cxx_compiler_flag(-Werror RELEASE)