diff options
author | David Robillard <d@drobilla.net> | 2023-05-01 15:17:05 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-05-01 15:21:59 -0400 |
commit | 093d2fd80dfa0bb921eb7531e2d1246a17e7b0b1 (patch) | |
tree | c9b396d995646692bd5befd0201aee571cf1709f /benchmark | |
parent | 91e55a8443895c63d3b5a427b2b8abf86064a7fe (diff) | |
download | zix-093d2fd80dfa0bb921eb7531e2d1246a17e7b0b1.tar.gz zix-093d2fd80dfa0bb921eb7531e2d1246a17e7b0b1.tar.bz2 zix-093d2fd80dfa0bb921eb7531e2d1246a17e7b0b1.zip |
Split up main meson file
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/meson.build | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/benchmark/meson.build b/benchmark/meson.build new file mode 100644 index 0000000..338f4ae --- /dev/null +++ b/benchmark/meson.build @@ -0,0 +1,40 @@ +# Copyright 2020-2023 David Robillard <d@drobilla.net> +# SPDX-License-Identifier: 0BSD OR ISC + +benchmarks = [ + 'dict_bench', + 'tree_bench', +] + +glib_dep = dependency( + 'glib-2.0', + include_type: 'system', + required: get_option('benchmarks'), + version: '>= 2.0.0', +) + +if glib_dep.found() + build_benchmarks = true + benchmark_c_args = platform_c_args + + if cc.get_id() == 'clang' + benchmark_c_suppressions = [ + '-Wno-reserved-identifier', + ] + + benchmark_c_args += cc.get_supported_arguments(benchmark_c_suppressions) + endif + + foreach benchmark : benchmarks + benchmark( + benchmark, + executable( + benchmark, + files('@0@.c'.format(benchmark)), + c_args: c_suppressions + benchmark_c_args, + dependencies: [zix_dep, glib_dep], + include_directories: include_dirs, + ), + ) + endforeach +endif |