[cmake] use /W4 with visual studio

pull/2320/head
nick black 3 years ago
parent 8f9608eb19
commit e67a641bbd
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -116,16 +116,19 @@ if(NOT WIN32)
add_compile_definitions(_FORTIFY_SOURCE=2)
add_compile_options(-Wformat -Werror=format-security)
endif()
if(MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wall -Wextra -W -Wshadow -Wvla)
# -ffast-math dies on NaNs we draw from libav (by -ffinite-math-only)
add_compile_options(-fno-signed-zeros -fno-trapping-math -fassociative-math)
add_compile_options(-fno-math-errno -freciprocal-math -funsafe-math-optimizations)
add_compile_options(-fexceptions -fstrict-aliasing)
if(${USE_ASAN})
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
endif()
endif()
# don't use REQUIRED with subsequent find_package() operations; we use
# feature_summary + set_package_properties to fail in one fell swoop.

Loading…
Cancel
Save