From b8187f44d6a3e550029ebce80e0ac47cea12151f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 29 Apr 2018 00:11:15 +0200 Subject: [PATCH] doc: avoid MSVC warnings when compiling snippets. --- doc/snippets/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/snippets/CMakeLists.txt b/doc/snippets/CMakeLists.txt index 03527e3f3..6413229d9 100644 --- a/doc/snippets/CMakeLists.txt +++ b/doc/snippets/CMakeLists.txt @@ -23,6 +23,11 @@ # DEALINGS IN THE SOFTWARE. # +# On MSVC remove /W3, as we are replacing it with /W4 +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") + string(REPLACE "/W3" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +endif() + set_directory_properties(PROPERTIES CORRADE_CXX_STANDARD 11 CORRADE_USE_PEDANTIC_FLAGS ON)