one more warning suppressed in MSVC

This commit is contained in:
Ulrich Mohr 2023-02-07 13:25:13 +01:00
parent e4c11f8107
commit e7e9ce4baf
1 changed files with 2 additions and 1 deletions

View File

@ -66,7 +66,8 @@ endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Manually tweak MSVC to emit (about) the same warnings as clang and gcc on linux
add_compile_options("/permissive-" /wd4267 /wd4244 /wd4244 /wd4305 /wd4805 /wd4267 /wd4646 /wd4065 /Dand=&& /Dor=|| /Dnot=!)
# needs to be done here using add_compile_definitions() (as opposed to target_compile_definitions()) to be available for all binaries and libraries
add_compile_options("/permissive-" /wd4267 /wd4244 /wd4244 /wd4305 /wd4805 /wd4267 /wd4646 /wd4065 /wd4996 /Dand=&& /Dor=|| /Dnot=!)
add_compile_definitions(NOMINMAX)
endif()