mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-19 02:34:51 +02:00
Meson: Define G_ENABLE_DEBUG and friends
https://bugzilla.gnome.org/show_bug.cgi?id=794790
This commit is contained in:
parent
b0ae762a33
commit
cc7e0f6cc2
10
meson.build
10
meson.build
@ -2,6 +2,7 @@ project('glib', 'c', 'cpp',
|
|||||||
version : '2.57.0',
|
version : '2.57.0',
|
||||||
meson_version : '>= 0.45.0',
|
meson_version : '>= 0.45.0',
|
||||||
default_options : [
|
default_options : [
|
||||||
|
'buildtype=debugoptimized',
|
||||||
'warning_level=1',
|
'warning_level=1',
|
||||||
'c_std=gnu89'
|
'c_std=gnu89'
|
||||||
]
|
]
|
||||||
@ -190,6 +191,15 @@ glibconfig_conf.set('glib_os', glib_os)
|
|||||||
# for dependencies that don't normally come with pkg-config files for Visual Studio builds
|
# for dependencies that don't normally come with pkg-config files for Visual Studio builds
|
||||||
buildtype = get_option('buildtype')
|
buildtype = get_option('buildtype')
|
||||||
|
|
||||||
|
glib_debug_cflags = []
|
||||||
|
if buildtype.startswith('debug')
|
||||||
|
glib_debug_cflags += ['-DG_ENABLE_DEBUG']
|
||||||
|
elif buildtype == 'release'
|
||||||
|
glib_debug_cflags += ['-DG_DISABLE_CAST_CHECKS']
|
||||||
|
endif
|
||||||
|
|
||||||
|
add_project_arguments(glib_debug_cflags, language: 'c')
|
||||||
|
|
||||||
# check for header files
|
# check for header files
|
||||||
|
|
||||||
headers = [
|
headers = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user