From c0bc43d070a50b78381e086ca0d10c34bc397642 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Fri, 13 Dec 2024 20:33:47 -0600 Subject: [PATCH] enable C5038 for MSVC This change enables MSVC diagnostic C5038, which is equivalent to the diagnostic gcc generates when `-Werror=reorder` is violated --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index beb65ef363..1b6e861978 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,6 +109,9 @@ if(MSVC) # this is equivalent to gcc -Wno_conversions which is the default as gcc -Wall doesn't enable -Wconversions add_compile_options("/wd4244") + # Enable C5038 - This is equivalent to gcc's -Werror=reorder, which is enabled by default by gcc -Wall + add_compile_options("/w15038") + # 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")