Commit b5e8ad05 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

meson: add -Wno-unused also to C++ args when gst debug system is disabled

parent ab8cc537
Pipeline #25329 passed with stages
in 78 minutes and 23 seconds
...@@ -159,6 +159,7 @@ ugly_args = ['-DHAVE_CONFIG_H'] ...@@ -159,6 +159,7 @@ ugly_args = ['-DHAVE_CONFIG_H']
configinc = include_directories('.') configinc = include_directories('.')
libsinc = include_directories('gst-libs') libsinc = include_directories('gst-libs')
# Disable compiler warnings for unused variables and args if gst debug system is disabled
if gst_dep.type_name() == 'internal' if gst_dep.type_name() == 'internal'
gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug') gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug')
else else
...@@ -167,8 +168,16 @@ else ...@@ -167,8 +168,16 @@ else
gst_debug_disabled = cc.has_header_symbol('gst/gstconfig.h', 'GST_DISABLE_GST_DEBUG', dependencies: gst_dep) gst_debug_disabled = cc.has_header_symbol('gst/gstconfig.h', 'GST_DISABLE_GST_DEBUG', dependencies: gst_dep)
endif endif
if gst_debug_disabled and cc.has_argument('-Wno-unused') if gst_debug_disabled
add_project_arguments('-Wno-unused', language: 'c') message('GStreamer debug system is disabled')
if cc.has_argument('-Wno-unused')
add_project_arguments('-Wno-unused', language: 'c')
endif
if have_cxx and cxx.has_argument ('-Wno-unused')
add_project_arguments('-Wno-unused', language: 'cpp')
endif
else
message('GStreamer debug system is enabled')
endif endif
warning_flags = [ warning_flags = [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment