Merge branch 'wip/lantw/meson-Check-for-debug-and-optimization-in-the-same-way-as-GTK-4' into 'gtk-3-24'
meson: Check for debug and optimization in the same way as GTK 4 See merge request GNOME/gtk!1818
This commit is contained in:
commit
373dd2a27e
13
meson.build
13
meson.build
@ -57,13 +57,14 @@ add_project_arguments('-DGTK_VERSION="@0@"'.format(meson.project_version()), lan
|
||||
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
||||
|
||||
gtk_debug_cflags = []
|
||||
buildtype = get_option('buildtype')
|
||||
if buildtype.startswith('debug')
|
||||
debug = get_option('debug')
|
||||
optimization = get_option('optimization')
|
||||
if debug
|
||||
gtk_debug_cflags += '-DG_ENABLE_DEBUG'
|
||||
# if buildtype == 'debug'
|
||||
# gtk_debug_cflags += '-DG_ENABLE_CONSISTENCY_CHECKS'
|
||||
# endif
|
||||
elif buildtype == 'release'
|
||||
if optimization in ['0', 'g']
|
||||
gtk_debug_cflags += '-DG_ENABLE_CONSISTENCY_CHECKS'
|
||||
endif
|
||||
elif optimization in ['2', '3', 's']
|
||||
gtk_debug_cflags += '-DG_DISABLE_CAST_CHECKS'
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user