From ff4899f54577a458c65413a184f434a84aba82b1 Mon Sep 17 00:00:00 2001 From: nerix Date: Mon, 21 Nov 2022 19:49:16 +0100 Subject: [PATCH] chore(msvc): replace /W3 with /W4 (#4175) Co-authored-by: pajlada --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 97964150b..c5bca5294 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -783,6 +783,9 @@ endif () # Configure compiler warnings if (MSVC) + # Someone adds /W3 before we add /W4. + # This makes sure, only /W4 is specified. + string(REPLACE "/W3" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # 4714 - function marked as __forceinline not inlined # 4996 - occurs when the compiler encounters a function or variable that is marked as deprecated. # These functions may have a different preferred name, may be insecure or have