build: enable severe warnings for MSVC release

Enable severe warnings for MSVC release builds with /W1.

Disable macro redefinition warnings explicitly with /wd4005.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2023-01-06 16:58:52 +00:00
parent 0a96d84581
commit 3989146fa5
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 3 additions and 1 deletions

View File

@ -814,7 +814,9 @@ elseif(MSVC)
add_compiler_flags(${runtime} /ZI /W4 /Ob0 /Od /RTC1 /DDEBUG /EHsc)
else()
add_compiler_flags(/w /DNDEBUG /EHsc)
# Enable severe warnings for release builds, but suppress macro
# redefinition warnings.
add_compiler_flags(/W1 /wd4005 /DNDEBUG /EHsc)
if(CMAKE_BUILD_TYPE STREQUAL Release)
if(X86_32)