From c719a94db39f203d953d3ab7bc86ce692bf00ae7 Mon Sep 17 00:00:00 2001 From: Donghak PARK Date: Wed, 14 Aug 2024 15:27:58 +0900 Subject: [PATCH] [Benchmarks] Update Meson.build file - modify meson build to check for the existence of a dependency on Google Benchmarks - configure it with options to run application benchmarks **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: Donghak PARK --- meson.build | 6 +++++- meson_options.txt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c4d94e8e9b..e1874374f7 100644 --- a/meson.build +++ b/meson.build @@ -293,7 +293,7 @@ endif gmock_dep = dependency('gmock', static: true, main: false, required: false) gtest_dep = dependency('gtest', static: true, main: false, required: false) gtest_main_dep = dependency('gtest', static: true, main: true, required: false) - +benchmark_dep = dependency('benchmark', static : true, main : false, required : false) if get_option('enable-test') # and get_option('platform') != 'android' extra_defines += '-DENABLE_TEST=1' @@ -474,3 +474,7 @@ endif if get_option('platform') != 'none' message('building for ' + get_option('platform')) endif + +if get_option('enable-benchmarks') + subdir('benchmarks') +endif \ No newline at end of file diff --git a/meson_options.txt b/meson_options.txt index 7df5da16e9..47074aacdb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -43,6 +43,7 @@ option('enable-openmp', type: 'boolean', value: true) option('enable-neon', type: 'boolean', value: false) option('enable-avx', type: 'boolean', value: false) option('enable-opencl', type: 'boolean', value: false) +option('enable-benchmarks', type: 'boolean', value : false) # ml-api dependency (to enable, install capi-inference from github.com/nnstreamer/api ) # To inter-operate with nnstreamer and ML-API packages, you need to enable this.