From 9c9433d21a6b44a3255ebb2e3a422a50cbef4809 Mon Sep 17 00:00:00 2001 From: Misa Date: Wed, 13 Jan 2021 19:18:29 -0800 Subject: [PATCH] Disable MSVC warnings about implicit conversion Implicit conversion warnings happen all over the codebase, but there's no reason to warn on all of them, and adding casts everywhere is annoying to read and patently unnecessary. MSVC is the only compiler that has this warning (GCC even on -Wall -Wextra doesn't warn about implicit conversions), so disable it for MSVC. --- desktop_version/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop_version/CMakeLists.txt b/desktop_version/CMakeLists.txt index fcec6268..24615252 100644 --- a/desktop_version/CMakeLists.txt +++ b/desktop_version/CMakeLists.txt @@ -225,6 +225,11 @@ IF(SUPPORTS_IMPLICIT_FALLTHROUGH) TARGET_COMPILE_OPTIONS(VVVVVV PRIVATE -Werror=implicit-fallthrough) ENDIF() +IF(MSVC) + # Disable MSVC warnings about implicit conversion + TARGET_COMPILE_OPTIONS(VVVVVV PRIVATE /wd4244) +ENDIF() + SET_PROPERTY(TARGET VVVVVV PROPERTY CXX_STANDARD 98) SET_PROPERTY(TARGET VVVVVV PROPERTY CXX_EXTENSIONS FALSE)