third_party_benchmark/BUILD.gn

62 lines
1.7 KiB
Plaintext

# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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") {
include_dirs = [ "include" ]
}
# This is the configuration used to build benchmark itself.
# It should not be needed outside of this library.
config("benchmark_private_config") {
visibility = [ ":*" ]
include_dirs = [ "include" ]
}
ohos_static_library("benchmark") {
sources = [
"src/benchmark.cc",
"src/benchmark_api_internal.cc",
"src/benchmark_name.cc",
"src/benchmark_register.cc",
"src/benchmark_runner.cc",
"src/colorprint.cc",
"src/commandlineflags.cc",
"src/complexity.cc",
"src/console_reporter.cc",
"src/counter.cc",
"src/csv_reporter.cc",
"src/json_reporter.cc",
"src/perf_counters.cc",
"src/reporter.cc",
"src/sleep.cc",
"src/statistics.cc",
"src/string_util.cc",
"src/sysinfo.cc",
"src/timers.cc",
]
public_configs = [ ":benchmark_config" ]
configs = [ ":benchmark_private_config" ]
}
ohos_static_library("benchmark_main") {
include_dirs = [ "include" ]
sources = [ "src/benchmark_main.cc" ]
deps = [ ":benchmark" ]
}