mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
meson: add glib-checks option to disable API guards and such
We want this enabled by default, also in releases, but people may want to disable this for performance-critical workloads or on embedded devices.
This commit is contained in:
parent
1978287b66
commit
c0c112a45c
2 changed files with 8 additions and 0 deletions
|
@ -86,6 +86,12 @@ if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
|
||||||
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 glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
|
||||||
|
message('Disabling GLib checks')
|
||||||
|
add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
|
||||||
|
endif
|
||||||
|
|
||||||
core_conf = configuration_data()
|
core_conf = configuration_data()
|
||||||
check_headers = [
|
check_headers = [
|
||||||
['HAVE_DLFCN_H', 'dlfcn.h'],
|
['HAVE_DLFCN_H', 'dlfcn.h'],
|
||||||
|
|
|
@ -75,6 +75,8 @@ 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)')
|
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)')
|
||||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)')
|
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,
|
||||||
|
|
Loading…
Reference in a new issue