meson: option to add _GLIBCXX_ASSERTIONS define

This commit is contained in:
jackun 2020-02-04 10:10:26 +02:00
parent b5bfd437a6
commit 6400ab3cdc
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3
2 changed files with 5 additions and 0 deletions

View File

@ -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 <stdint.h>
int main() {

1
meson_options.txt Normal file
View File

@ -0,0 +1 @@
option('glibcxx_asserts', type : 'boolean', value : false)