diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2019-03-21 11:23:07 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-03-21 11:38:33 +0000 |
commit | b5e8ad053065d3d4109069e1ff7d37ceae5b4dec (patch) | |
tree | 63009322af06452be32387b54e687363cfa250b3 | |
parent | ab8cc537aad620f518d22acbdce185a82258c93e (diff) |
meson: add -Wno-unused also to C++ args when gst debug system is disabled
-rw-r--r-- | meson.build | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 49ffd79a..b283ed5b 100644 --- a/meson.build +++ b/meson.build @@ -159,6 +159,7 @@ ugly_args = ['-DHAVE_CONFIG_H'] configinc = include_directories('.') 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' gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug') else @@ -167,8 +168,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 have_cxx and cxx.has_argument ('-Wno-unused') + add_project_arguments('-Wno-unused', language: 'cpp') + endif +else + message('GStreamer debug system is enabled') endif warning_flags = [ |