meson: add option to build tests, default to false

This commit is contained in:
Randy
2020-08-05 22:49:52 +02:00
parent 640795a771
commit 92b75a1345
2 changed files with 12 additions and 8 deletions

View File

@@ -83,6 +83,7 @@ pkg.generate(
description : 'OpenGL Mathematics (glm) for C'
)
if get_option('build_tests') == true
test_src = files(
'test/runner.c',
@@ -102,3 +103,5 @@ test_exe = executable('tests',
)
test('cglm.tests', test_exe)
endif

1
meson_options.txt Normal file
View File

@@ -0,0 +1 @@
option('build_tests', type : 'boolean', value : false, description : 'Build tests')