From ab4bb52ebdcab82f876d82a7e2132b4c29aac9e6 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Tue, 18 Nov 2025 11:37:57 -0600 Subject: [PATCH] enable msvc c4062 fixes #5641 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4824ad4ed1..a9bb70aa15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,6 +122,9 @@ if(MSVC) # Enable C5038 - This is equivalent to gcc's -Werror=reorder, which is enabled by default by gcc -Wall add_compile_options("/w15038") + # Enable C4062 - Warns about missing enum case in switch statement, equivalent to gcc -Wswitch + add_compile_options("/w14062") + # MSVC panics if an object file contains more than 65,279 sections. this # happens quite frequently with code that uses templates, such as vectors. add_compile_options("/bigobj")