build: combine test & bench internal deps No need to duplicate this really. Signed-off-by: Ran Benita <ran@unusedvar.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
diff --git a/meson.build b/meson.build
index 6e433f4..f3b58e1 100644
--- a/meson.build
+++ b/meson.build
@@ -515,6 +515,8 @@ libxkbcommon_test_internal = static_library(
'test/common.c',
'test/test.h',
'test/evdev-scancodes.h',
+ 'bench/bench.c',
+ 'bench/bench.h',
libxkbcommon_sources,
include_directories: include_directories('src'),
)
@@ -677,36 +679,26 @@ executable('fuzz-compose', 'fuzz/compose/target.c', dependencies: test_dep)
# Benchmarks.
-libxkbcommon_bench_internal = static_library(
- 'xkbcommon-bench-internal',
- 'bench/bench.c',
- 'bench/bench.h',
- link_with: libxkbcommon_test_internal,
-)
-bench_dep = declare_dependency(
- include_directories: include_directories('src'),
- link_with: libxkbcommon_bench_internal,
-)
bench_env = environment()
bench_env.set('top_srcdir', meson.source_root())
benchmark(
'key-proc',
- executable('bench-key-proc', 'bench/key-proc.c', dependencies: bench_dep),
+ executable('bench-key-proc', 'bench/key-proc.c', dependencies: test_dep),
env: bench_env,
)
benchmark(
'rules',
- executable('bench-rules', 'bench/rules.c', dependencies: bench_dep),
+ executable('bench-rules', 'bench/rules.c', dependencies: test_dep),
env: bench_env,
)
benchmark(
'rulescomp',
- executable('bench-rulescomp', 'bench/rulescomp.c', dependencies: bench_dep),
+ executable('bench-rulescomp', 'bench/rulescomp.c', dependencies: test_dep),
env: bench_env,
)
benchmark(
'compose',
- executable('bench-compose', 'bench/compose.c', dependencies: bench_dep),
+ executable('bench-compose', 'bench/compose.c', dependencies: test_dep),
env: bench_env,
)