mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
meson: add -Wno-unused also to C++ args when gst debug system is disabled
This commit is contained in:
parent
ebb0527e75
commit
8fd04194a9
1 changed files with 11 additions and 2 deletions
13
meson.build
13
meson.build
|
@ -377,6 +377,7 @@ if host_system == 'android'
|
|||
gnustl_dep = dependency('gnustl', required : false)
|
||||
endif
|
||||
|
||||
# Disable compiler warnings for unused variables and args if gst debug system is disabled
|
||||
if gst_dep.type_name() == 'internal'
|
||||
gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug')
|
||||
else
|
||||
|
@ -385,8 +386,16 @@ else
|
|||
gst_debug_disabled = cc.has_header_symbol('gst/gstconfig.h', 'GST_DISABLE_GST_DEBUG', dependencies: gst_dep)
|
||||
endif
|
||||
|
||||
if gst_debug_disabled and cc.has_argument('-Wno-unused')
|
||||
add_project_arguments('-Wno-unused', language: 'c')
|
||||
if gst_debug_disabled
|
||||
message('GStreamer debug system is disabled')
|
||||
if cc.has_argument('-Wno-unused')
|
||||
add_project_arguments('-Wno-unused', language: 'c')
|
||||
endif
|
||||
if cxx.has_argument ('-Wno-unused')
|
||||
add_project_arguments('-Wno-unused', language: 'cpp')
|
||||
endif
|
||||
else
|
||||
message('GStreamer debug system is enabled')
|
||||
endif
|
||||
|
||||
gst_plugins_bad_args = ['-DHAVE_CONFIG_H']
|
||||
|
|
Loading…
Reference in a new issue