diff mbox series

meson: add utest option

Message ID 20240225204759.3263-1-fontaine.fabrice@gmail.com (mailing list archive)
State Accepted
Commit e04fa0168fe91bb17b127df78a2bec67246c5fd8
Headers show
Series meson: add utest option | expand

Commit Message

Fabrice Fontaine Feb. 25, 2024, 8:47 p.m. UTC
Add utest option to allow the user to disable utest

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 meson.build       | 2 +-
 meson_options.txt | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index 3156f1c..d4cfd53 100644
--- a/meson.build
+++ b/meson.build
@@ -35,7 +35,7 @@  incdir = include_directories(['include'])
 
 subdir('src')
 subdir('include')
-if cunit_dep.found()
+if get_option('utest') and cunit_dep.found()
     subdir('utest')
 endif
 if get_option('samples')
diff --git a/meson_options.txt b/meson_options.txt
index 8450992..a48efea 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -18,3 +18,5 @@  option('doc', type : 'boolean', value: true,
        description : 'produce documentation')
 option('samples', type : 'boolean', value: true,
        description : 'build samples')
+option('utest', type : 'boolean', value: true,
+       description : 'build utest')