From ba9adbfb771c743d1c0384765db2e59ca3198acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 5 May 2015 22:25:46 +0200 Subject: [PATCH] Fix more annoying compiler warnings on MSVC. --- src/CMakeLists.txt | 7 +++++++ src/Corrade/CMakeLists.txt | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9ed5c5808..c7eda99f2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,6 +23,13 @@ # DEALINGS IN THE SOFTWARE. # +# On MSVC remove /W3, as we are replacing it with /W4 +if(MSVC) + string(REPLACE "/W3" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +endif() + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CORRADE_CXX_FLAGS}") + include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) add_subdirectory(Corrade) diff --git a/src/Corrade/CMakeLists.txt b/src/Corrade/CMakeLists.txt index aa098af19..16ac63d9f 100644 --- a/src/Corrade/CMakeLists.txt +++ b/src/Corrade/CMakeLists.txt @@ -23,8 +23,6 @@ # DEALINGS IN THE SOFTWARE. # -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CORRADE_CXX_FLAGS}") - if(NOT BUILD_STATIC) set(SHARED_OR_STATIC SHARED) else()