diff --git a/meson.build b/meson.build index dfb4c6bb..3dfe21de 100644 --- a/meson.build +++ b/meson.build @@ -50,6 +50,10 @@ if ['linux', 'cygwin', 'gnu'].contains(host_machine.system()) pre_args += '-DHAVE_PTHREAD' endif +if get_option('glibcxx_asserts') + pre_args += '-D_GLIBCXX_ASSERTIONS' +endif + # Check for GCC style atomics if cc.compiles('''#include int main() { diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000..cf87a716 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1 @@ +option('glibcxx_asserts', type : 'boolean', value : false)