mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
[cmake] use /W4 with visual studio
This commit is contained in:
parent
8f9608eb19
commit
e67a641bbd
@ -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…
x
Reference in New Issue
Block a user