[libgee/meson: 19/24] Meson: internal asserts can be disable



commit 32d89c91f3400bdc2e7684c5e1bda6a1b6e0ece5
Author: Daniel Espinosa <daniel espinosa pwmc mx>
Date:   Tue May 16 11:37:17 2017 -0500

    Meson: internal asserts can be disable

 gee/meson.build   | 8 +++++++-
 meson_options.txt | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/gee/meson.build b/gee/meson.build
index 2132047..26bcef5 100644
--- a/gee/meson.build
+++ b/gee/meson.build
@@ -93,13 +93,19 @@ sources = files ([])
 includehdir = include_directories ('.')
 includehdir_dep = declare_dependency (include_directories : includehdir)
 
+internal_asserts_opt = get_option ('disable-internal-asserts')
+internal_asserts_args = []
+if internal_asserts_opt
+       internal_asserts_args += ['-D','DISABLE_INTERNAL_ASSERTS']
+endif
+
 gee = library('gee-@0@'.format(API_VERSION),
        valasources + sources,
        version : PROJECT_VERSION,
        vala_header : 'gee.h',
        vala_vapi : 'gee-@0@.vapi'.format(API_VERSION),
        vala_gir : 'Gee-@0@.gir'.format(API_VERSION),
-       vala_args : [ '--pkg', 'geeutils'],
+       vala_args : [ '--pkg', 'geeutils'] + internal_asserts_args,
        vala_internal_header : 'gee-internals.h',
        vala_internal_vapi : 'gee-internals-0.8.vapi',
        dependencies : [ gio, include_utils_h_dir_dep ],
diff --git a/meson_options.txt b/meson_options.txt
index e165239..d1bca2d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1 +1,2 @@
 option('enable-benchmark', type : 'boolean', value : false, description : 'Enable benchmark')
+option('disable-internal-asserts', type : 'boolean', value : false, description : 'Disables the internal 
asserts')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]