Commit bec64dec authored by Xavier Claessens's avatar Xavier Claessens
Browse files

Meson: Align assert/check options with GLib

parent 4216bd6e
Pipeline #130622 passed with stages
in 54 minutes and 12 seconds
...@@ -89,20 +89,17 @@ if gst_version_is_dev ...@@ -89,20 +89,17 @@ if gst_version_is_dev
add_project_arguments('-DG_DISABLE_DEPRECATED', language: 'c') add_project_arguments('-DG_DISABLE_DEPRECATED', language: 'c')
endif endif
cast_checks = get_option('gobject-cast-checks') if not get_option('debug') and get_option('optimization') in ['2', '3', 's']
if cast_checks.disabled() or (cast_checks.auto() and not gst_version_is_dev)
message('Disabling GLib cast checks') message('Disabling GLib cast checks')
add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'c') add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'c')
endif endif
glib_asserts = get_option('glib-asserts') if not get_option('glib_asserts')
if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
message('Disabling GLib asserts') message('Disabling GLib asserts')
add_project_arguments('-DG_DISABLE_ASSERT', language: 'c') add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
endif endif
glib_checks = get_option('glib-checks') if not get_option('glib_checks')
if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
message('Disabling GLib checks') message('Disabling GLib checks')
add_project_arguments('-DG_DISABLE_CHECKS', language: 'c') add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
endif endif
......
...@@ -73,12 +73,6 @@ option('tools', type : 'feature', value : 'auto', yield : true) ...@@ -73,12 +73,6 @@ option('tools', type : 'feature', value : 'auto', yield : true)
option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings') option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings')
option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)') option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')
option('orc', type : 'feature', value : 'auto', yield : true) option('orc', type : 'feature', value : 'auto', yield : true)
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)')
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)')
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)')
# Common options # Common options
option('package-name', type : 'string', yield : true, option('package-name', type : 'string', yield : true,
...@@ -87,3 +81,7 @@ option('package-origin', type : 'string', value : 'Unknown package origin', yiel ...@@ -87,3 +81,7 @@ option('package-origin', type : 'string', value : 'Unknown package origin', yiel
description : 'package origin URL to use in plugins') description : 'package origin URL to use in plugins')
option('doc', type : 'feature', value : 'auto', yield: true, option('doc', type : 'feature', value : 'auto', yield: true,
description: 'Enable documentation.') description: 'Enable documentation.')
option('glib_asserts', type : 'boolean', value : true, yield : true,
description: 'Enable GLib assertion')
option('glib_checks', type : 'boolean', value : true, yield : true,
description: 'Enable GLib checks such as API guards')
Markdown is supported
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