2022-01-11 06:24:15 +00:00
|
|
|
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
2022-07-20 07:46:41 +00:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2022-01-11 06:24:15 +00:00
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
import("//build/ohos.gni")
|
|
|
|
|
|
|
|
# Lets callers do '#include <benchmark.h>'
|
|
|
|
config("benchmark_config") {
|
2022-07-21 01:29:34 +00:00
|
|
|
include_dirs = [ "include" ]
|
2022-01-11 06:24:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# This is the configuration used to build benchmark itself.
|
|
|
|
# It should not be needed outside of this library.
|
|
|
|
config("benchmark_private_config") {
|
2022-07-20 07:46:41 +00:00
|
|
|
visibility = [ ":*" ]
|
2022-07-21 01:29:34 +00:00
|
|
|
include_dirs = [ "include" ]
|
2022-01-11 06:24:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ohos_static_library("benchmark") {
|
2022-07-20 07:46:41 +00:00
|
|
|
sources = [
|
2022-07-21 01:29:34 +00:00
|
|
|
"src/benchmark.cc",
|
2022-07-20 07:46:41 +00:00
|
|
|
"src/benchmark_api_internal.cc",
|
|
|
|
"src/benchmark_name.cc",
|
|
|
|
"src/benchmark_register.cc",
|
|
|
|
"src/benchmark_runner.cc",
|
2024-04-20 08:23:27 +00:00
|
|
|
"src/check.cc",
|
2022-07-20 07:46:41 +00:00
|
|
|
"src/colorprint.cc",
|
|
|
|
"src/commandlineflags.cc",
|
|
|
|
"src/complexity.cc",
|
|
|
|
"src/console_reporter.cc",
|
|
|
|
"src/counter.cc",
|
|
|
|
"src/csv_reporter.cc",
|
|
|
|
"src/json_reporter.cc",
|
2022-07-21 01:29:34 +00:00
|
|
|
"src/perf_counters.cc",
|
2022-07-20 07:46:41 +00:00
|
|
|
"src/reporter.cc",
|
|
|
|
"src/statistics.cc",
|
|
|
|
"src/string_util.cc",
|
|
|
|
"src/sysinfo.cc",
|
|
|
|
"src/timers.cc",
|
|
|
|
]
|
2022-07-21 01:29:34 +00:00
|
|
|
|
2022-07-20 07:46:41 +00:00
|
|
|
public_configs = [ ":benchmark_config" ]
|
|
|
|
configs = [ ":benchmark_private_config" ]
|
2022-01-11 06:24:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ohos_static_library("benchmark_main") {
|
2022-07-21 01:29:34 +00:00
|
|
|
include_dirs = [ "include" ]
|
2022-01-11 06:24:15 +00:00
|
|
|
|
2022-07-21 01:29:34 +00:00
|
|
|
sources = [ "src/benchmark_main.cc" ]
|
2022-01-11 06:24:15 +00:00
|
|
|
|
2022-07-21 01:29:34 +00:00
|
|
|
deps = [ ":benchmark" ]
|
2022-07-20 08:20:47 +00:00
|
|
|
}
|