From 6400ab3cdc573a30b517b781c0cc44d873c0e7f7 Mon Sep 17 00:00:00 2001 From: jackun Date: Tue, 4 Feb 2020 10:10:26 +0200 Subject: [PATCH] meson: option to add _GLIBCXX_ASSERTIONS define --- meson.build | 4 ++++ meson_options.txt | 1 + 2 files changed, 5 insertions(+) create mode 100644 meson_options.txt 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)