]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
CMake: For VS build, switch from /W2 to /W3
authorFrank Lichtenheld <frank@lichtenheld.com>
Mon, 8 Dec 2025 11:36:30 +0000 (12:36 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 8 Dec 2025 14:17:45 +0000 (15:17 +0100)
But exclude the added checks that currently have failures
so that we can keep /WX enabled.
Basically this excludes -Wconversion and -Wsign-compare,
as expected from our GCC/Clang flags.

Github: #382
Change-Id: Iffc114939cb37129057e9c4864fae9e09c3c7fe4
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1417
Message-Id: <20251208113636.9650-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34876.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
CMakeLists.txt

index b3142e4543b3be96a6e24f9fca5fab51ed744520..906fa04c1f34f4a6731686a223364fa3571a1d4c 100644 (file)
@@ -85,9 +85,12 @@ if (MSVC)
     if (USE_WERROR)
         add_compile_options(/WX)
     endif ()
+    # C4018: signed/unsigned mismatch
+    # C4244: conversion from 'type1' to 'type2', possible loss of data
+    # C4267: conversion from 'size_t' to 'type', possible loss of data
     add_compile_options(
         /MP
-        /W2
+        /W3 /wd4018 /wd4267 /wd4244
         /sdl
         /Qspectre
         /guard:cf