Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkcgen <kcgen@users.noreply.github.com>2022-08-07 21:59:49 +0300
committerkcgen <1557255+kcgen@users.noreply.github.com>2022-08-08 04:02:33 +0300
commitf0670763fe34f536ea2b06eea4d4eb0c58b02ab1 (patch)
tree5fb874fbe2bd99cde04d3f3d335b65708c707965 /meson.build
parentd38a194a0f02420d9b6f0c9146a6fa5f5442be63 (diff)
Move meson test to top-level and use in iir1
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build15
1 files changed, 13 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index f72fe33f1..434b0b271 100644
--- a/meson.build
+++ b/meson.build
@@ -309,11 +309,20 @@ threads_dep = dependency('threads')
static_libs_list = get_option('try_static_libs')
system_libs_list = get_option('use_system_libs')
+wants_tests = true
+# tests are disabled for release builds unless requested
+if get_option('buildtype') == 'release' and get_option('unit_tests').auto()
+ wants_tests = false
+elif get_option('unit_tests').disabled()
+ wants_tests = false
+endif
+
libiir_dep = dependency(
'iir',
version: '>= 1.9.3',
default_options: [
'default_library=static',
+ 'tests=' + wants_tests.to_string(),
'warning_level=0',
],
allow_fallback: ('iir' not in system_libs_list),
@@ -675,5 +684,7 @@ dosbox_dep = declare_dependency(link_with: libdosbox)
# Some tests use relative paths; in meson 0.56.0 this can be replaced
# with meson.project_source_root().
#
-project_source_root = meson.current_source_dir()
-subdir('tests')
+if wants_tests
+ project_source_root = meson.current_source_dir()
+ subdir('tests')
+endif