[libgee/meson: 14/18] Meson: Enable consistency check is now possible




commit dc31671d37e720253733343d5c3444c2e676b2ed
Author: Daniel Espinosa <daniel espinosa pwmc mx>
Date:   Tue May 16 11:42:12 2017 -0500

    Meson: Enable consistency check is now possible

 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 26bcef5..73b13a5 100644
--- a/gee/meson.build
+++ b/gee/meson.build
@@ -99,13 +99,19 @@ if internal_asserts_opt
        internal_asserts_args += ['-D','DISABLE_INTERNAL_ASSERTS']
 endif
 
+enable_consistency_check_opt = get_option ('enable-consistency-check')
+enable_consistency_check_args = []
+if enable_consistency_check_opt
+       enable_consistency_check_args += ['-D','CONSISTENCY_CHECKS']
+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'] + internal_asserts_args,
+       vala_args : [ '--pkg', 'geeutils'] + internal_asserts_args + enable_consistency_check_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 d1bca2d..8132ec2 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,2 +1,3 @@
 option('enable-benchmark', type : 'boolean', value : false, description : 'Enable benchmark')
 option('disable-internal-asserts', type : 'boolean', value : false, description : 'Disables the internal 
asserts')
+option('enable-consistency-check', type : 'boolean', value : false, description : 'Enables (very) expensive 
consistency checks. It might affect the asymptotic performance.')


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