mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
meson: Add ignored warnings for MSVC
https://bugzilla.gnome.org/show_bug.cgi?id=774656
This commit is contained in:
parent
9b18bafc68
commit
55d0e7a607
1 changed files with 20 additions and 1 deletions
21
meson.build
21
meson.build
|
@ -1,6 +1,6 @@
|
|||
project('gst-devtools', 'c',
|
||||
version : '1.11.0.1',
|
||||
meson_version : '>= 0.33.0',
|
||||
meson_version : '>= 0.36.0',
|
||||
default_options : [ 'warning_level=1',
|
||||
'c_std=gnu99',
|
||||
'buildtype=debugoptimized' ])
|
||||
|
@ -30,6 +30,25 @@ glib_req = '>= 2.40.0'
|
|||
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
if cc.get_id() == 'msvc'
|
||||
# Ignore several spurious warnings for things gstreamer does very commonly
|
||||
# If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
|
||||
# If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once
|
||||
# NOTE: Only add warnings here if you are sure they're spurious
|
||||
add_project_arguments(
|
||||
'/wd4018', # implicit signed/unsigned conversion
|
||||
'/wd4146', # unary minus on unsigned (beware INT_MIN)
|
||||
'/wd4244', # lossy type conversion (e.g. double -> int)
|
||||
'/wd4305', # truncating type conversion (e.g. double -> float)
|
||||
language : 'c')
|
||||
# Disable SAFESEH with MSVC for plugins and libs that use external deps that
|
||||
# are built with MinGW
|
||||
noseh_link_args = ['/SAFESEH:NO']
|
||||
else
|
||||
noseh_link_args = []
|
||||
endif
|
||||
|
||||
gst_dep = dependency('gstreamer-' + apiversion, version : gst_req,
|
||||
fallback : ['gstreamer', 'gst_dep'])
|
||||
gst_pbutils_dep = dependency('gstreamer-pbutils-' + apiversion, version : gst_req,
|
||||
|
|
Loading…
Reference in a new issue