From 77ce1c8f14b4a603c80b27cc0d7fbb31711f377e Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Thu, 12 May 2022 00:24:20 -0400 Subject: [PATCH] CMakeLists: Enforce C4267 on MSVC --- src/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7ec5dc26a..8aedcf489 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,7 +33,6 @@ if (MSVC) # /Zc:throwingNew - Let codegen assume `operator new` (without std::nothrow) will never return null # /external:* - Suppress warnings from external headers add_compile_options( - /W3 /MP /permissive- /EHsc @@ -45,6 +44,10 @@ if (MSVC) /external:I "${CMAKE_SOURCE_DIR}/externals" /external:anglebrackets /external:W0 + + # Warnings + /W3 + /we4267 # 'var': conversion from 'size_t' to 'type', possible loss of data ) # Since MSVC's debugging information is not very deterministic, so we have to disable it