summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build4
-rw-r--r--tests/meson.build9
2 files changed, 7 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index 70be03b..629e86e 100644
--- a/meson.build
+++ b/meson.build
@@ -256,9 +256,7 @@ can_add_dist_script = not meson.is_subproject() or meson.version().version_compa
subdir('MSVC_NMake')
subdir('sigc++')
subdir('examples')
-if build_tests
- subdir('tests')
-endif
+subdir('tests')
subdir('docs/docs/reference')
subdir('docs/docs/manual')
diff --git a/tests/meson.build b/tests/meson.build
index 87605a4..e0f57d7 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,6 +1,6 @@
# tests
-# input: sigcxx_own_dep, do_benchmark, can_benchmark, benchmark_dep
+# input: sigcxx_own_dep, build_tests, do_benchmark, can_benchmark, benchmark_dep
benchmark_timeout = 100
@@ -67,10 +67,13 @@ foreach ex : test_programs
exe_file = executable(ex_name, ex_sources,
dependencies: sigcxx_own_dep,
implicit_include_directories: false,
- build_by_default: true
+ build_by_default: build_tests,
)
- test(ex_name, exe_file)
+ # If exe_file is a test program, it is built by default unconditionally.
+ if build_tests
+ test(ex_name, exe_file)
+ endif
endforeach
if can_benchmark