diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-03-12 16:55:40 +0100 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-03-12 16:55:40 +0100 |
commit | c0e5395a1bc40b3e12b3bc3bbd5fae7d81f8029f (patch) | |
tree | ab27ada23db4703e80fe067c118802ccd5e8edb4 /tests | |
parent | 6e242eaba57bbc0f44ab7c4959d2e66ceeeededa (diff) | |
download | glibmm-c0e5395a1bc40b3e12b3bc3bbd5fae7d81f8029f.tar.gz |
Meson build: examples and tests: Add dependency('threads')
Multithreaded examples and tests depend on 'threads'.
I noticed this when I started experimenting with subprojects.
Strange that it was not reported as a missing dependency long ago.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/meson.build | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/meson.build b/tests/meson.build index d7cc5a30..07985851 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -40,6 +40,8 @@ test_programs = [ [['glibmm_vector'], 'test', ['main.cc'], true], ] +thread_dep = dependency('threads') + foreach ex : test_programs dir = '' foreach dir_part : ex[0] @@ -51,9 +53,12 @@ foreach ex : test_programs ex_sources += dir / src endforeach + is_multithread = ex[0][0] == 'glibmm_mainloop' + mm_dep = ex[3] ? giomm_dep : glibmm_dep + exe_file = executable(ex_name, ex_sources, cpp_args: ['-DGLIBMM_DISABLE_DEPRECATED', '-DGIOMM_DISABLE_DEPRECATED'], - dependencies: ex[3] ? giomm_dep : glibmm_dep, + dependencies: is_multithread ? [mm_dep, thread_dep] : mm_dep, gui_app: false, build_by_default: true, install: false, |