1# Copyright (c) 2023 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/config/components/hdi/hdi.gni")
15import("//build/ohos.gni")
16import("//build/test.gni")
17import("./../../audio.gni")
18
19module_output_path = "drivers_peripheral_audio/audio"
20
21ohos_benchmarktest("hdf_audio_benchmark_test") {
22  module_out_path = module_output_path
23
24  include_dirs = []
25
26  sources = [
27    "adapter/audio_adapter_benchmarktest.cpp",
28    "capture/audio_capture_benchmarktest.cpp",
29    "capture/audio_capture_mmap_benchmarktest.cpp",
30    "manager/audio_manager_benchmarktest.cpp",
31    "render/audio_render_benchmarktest.cpp",
32    "render/audio_render_mmap_benchmarktest.cpp",
33  ]
34
35  if (drivers_peripheral_audio_feature_effect) {
36    sources += [
37      "effect/audio_effectcontrol_benchmarktest.cpp",
38      "effect/audio_effectmodel_benchmarktest.cpp",
39    ]
40  }
41
42  cflags = [
43    "-Wall",
44    "-Wextra",
45    "-Werror",
46    "-fsigned-char",
47    "-fno-common",
48    "-fno-strict-aliasing",
49  ]
50
51  if (is_standard_system) {
52    external_deps = [
53      "drivers_interface_audio:libaudio_proxy_4.0",
54      "drivers_interface_audio:libeffect_proxy_1.0",
55      "hdf_core:libhdf_utils",
56      "hilog:libhilog",
57    ]
58    if (enable_c_utils) {
59      external_deps += [ "c_utils:utils" ]
60    }
61  } else if (defined(ohos_lite)) {
62    external_deps = [ "hilog_lite:hilog_shared" ]
63  } else {
64    external_deps = [ "hilog:libhilog" ]
65  }
66  external_deps += [
67    "benchmark:benchmark",
68    "bounds_checking_function:libsec_shared",
69    "googletest:gtest_main",
70    "ipc:ipc_single",
71  ]
72}
73