| 1 | From b50b584a2703394be08a2ad245b813b268a8e1ed Mon Sep 17 00:00:00 2001
|
| 2 | From: Philipp Zabel <[email protected]>
|
| 3 | Date: Sun, 4 Aug 2019 22:28:37 +0200
|
| 4 | Subject: [PATCH] meson: hook up unit tests
|
| 5 |
|
| 6 | Build the unit tests and hook them up to the ninja test target.
|
| 7 | ---
|
| 8 | meson.build | 24 ++++++++++++++++++++++++
|
| 9 | 1 file changed, 24 insertions(+)
|
| 10 |
|
| 11 | diff --git a/meson.build b/meson.build
|
| 12 | index 24198a4b..1e02bc10 100644
|
| 13 | |
| 14 | |
| 15 | @@ -223,3 +223,27 @@ pkg.generate(
|
| 16 | url: 'http://www.openhmd.net/',
|
| 17 | )
|
| 18 | install_headers('include/openhmd.h', subdir: 'openhmd')
|
| 19 | +
|
| 20 | +
|
| 21 | +#
|
| 22 | +# Unit tests
|
| 23 | +#
|
| 24 | +
|
| 25 | +unittests_sources = [
|
| 26 | + 'src/omath.c',
|
| 27 | + 'tests/unittests/highlevel.c',
|
| 28 | + 'tests/unittests/main.c',
|
| 29 | + 'tests/unittests/quat.c',
|
| 30 | + 'tests/unittests/tests.h',
|
| 31 | + 'tests/unittests/vec.c'
|
| 32 | +]
|
| 33 | +
|
| 34 | +unittests = executable(
|
| 35 | + 'openhmd_unittests',
|
| 36 | + unittests_sources,
|
| 37 | + include_directories: include_directories('./include', './src'),
|
| 38 | + link_with: [openhmd_lib],
|
| 39 | + dependencies: [dep_libm, dep_threads]
|
| 40 | +)
|
| 41 | +
|
| 42 | +test('unittests', unittests)
|