|
|
|
@ -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.
|
|
|
|
|