v8/third_party/google_benchmark/BUILD.gn
Michael Lippautz b804266f72 Add google_benchmark depdendency
This adds Google benchmark for microbenchmarking C++ code as an
optional dependency.

To enable, add the following to the .gclient before syncing
  "custom_vars": {
      "checkout_google_benchmark": True
  }

Change-Id: Id0eab772dd71558906658ef4bb60e31acd665948
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2275964
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68663}
2020-07-02 20:11:29 +00:00

74 lines
2.0 KiB
Plaintext

# Copyright 2020 The V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/gclient_args.gni")
if (checkout_google_benchmark) {
config("benchmark_config") {
include_dirs = [ "src/include" ]
}
source_set("google_benchmark") {
testonly = true
public = [ "src/include/benchmark/benchmark.h" ]
sources = [
"src/src/arraysize.h",
"src/src/benchmark.cc",
"src/src/benchmark_api_internal.cc",
"src/src/benchmark_api_internal.h",
"src/src/benchmark_name.cc",
"src/src/benchmark_register.cc",
"src/src/benchmark_register.h",
"src/src/benchmark_runner.cc",
"src/src/benchmark_runner.h",
"src/src/check.h",
"src/src/colorprint.cc",
"src/src/colorprint.h",
"src/src/commandlineflags.cc",
"src/src/commandlineflags.h",
"src/src/complexity.cc",
"src/src/complexity.h",
"src/src/console_reporter.cc",
"src/src/counter.cc",
"src/src/counter.h",
"src/src/csv_reporter.cc",
"src/src/cycle_clock.h",
"src/src/internal_macros.h",
"src/src/json_reporter.cc",
"src/src/log.h",
"src/src/mutex.h",
"src/src/re.h",
"src/src/reporter.cc",
"src/src/sleep.cc",
"src/src/sleep.h",
"src/src/statistics.cc",
"src/src/statistics.h",
"src/src/string_util.cc",
"src/src/string_util.h",
"src/src/sysinfo.cc",
"src/src/thread_manager.h",
"src/src/thread_timer.h",
"src/src/timers.cc",
"src/src/timers.h",
]
all_dependent_configs = [ ":benchmark_config" ]
defines = [
# Tell google_benchmark to always use standard regular expressions.
"HAVE_GNU_POSIX_REGEX=0",
"HAVE_POSIX_REGEX=0",
"HAVE_STD_REGEX=1",
]
}
source_set("benchmark_main") {
testonly = true
sources = [ "src/src/benchmark_main.cc" ]
deps = [ ":google_benchmark" ]
}
}