• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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/ohos.gni")
15
16# Lets callers do '#include <benchmark.h>'
17config("benchmark_config") {
18  include_dirs = [ "include" ]
19}
20
21# This is the configuration used to build benchmark itself.
22# It should not be needed outside of this library.
23config("benchmark_private_config") {
24  visibility = [ ":*" ]
25  include_dirs = [ "include" ]
26}
27
28ohos_static_library("benchmark") {
29  sources = [
30    "src/benchmark.cc",
31    "src/benchmark_api_internal.cc",
32    "src/benchmark_name.cc",
33    "src/benchmark_register.cc",
34    "src/benchmark_runner.cc",
35    "src/colorprint.cc",
36    "src/commandlineflags.cc",
37    "src/complexity.cc",
38    "src/console_reporter.cc",
39    "src/counter.cc",
40    "src/csv_reporter.cc",
41    "src/json_reporter.cc",
42    "src/perf_counters.cc",
43    "src/reporter.cc",
44    "src/sleep.cc",
45    "src/statistics.cc",
46    "src/string_util.cc",
47    "src/sysinfo.cc",
48    "src/timers.cc",
49  ]
50
51  public_configs = [ ":benchmark_config" ]
52  configs = [ ":benchmark_private_config" ]
53}
54
55ohos_static_library("benchmark_main") {
56  include_dirs = [ "include" ]
57
58  sources = [ "src/benchmark_main.cc" ]
59
60  deps = [ ":benchmark" ]
61}
62