meson: only add -fno-strict-aliasing if supported by compiler

Fixes warning spam on MSVC builds.

https://bugzilla.gnome.org/show_bug.cgi?id=791622
This commit is contained in:
Tim-Philipp Müller 2018-01-10 16:59:46 +00:00
parent f25c7a2a6e
commit b241e3a5cc

View File

@ -65,7 +65,9 @@ add_project_arguments('-D_GNU_SOURCE', language: 'c')
# Disable strict aliasing;
# see https://bugzilla.gnome.org/show_bug.cgi?id=791622
add_project_arguments('-fno-strict-aliasing', language: 'c')
if cc.has_argument('-fno-strict-aliasing')
add_project_arguments('-fno-strict-aliasing', language: 'c')
endif
########################
# Configuration begins #