• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5config("benchmark_config") {
6  include_dirs = [ "src/include" ]
7
8  if (!is_component_build) {
9    defines = [ "BENCHMARK_STATIC_DEFINE" ]
10  }
11}
12
13component("google_benchmark") {
14  testonly = true
15
16  public = [
17    "src/include/benchmark/benchmark.h",
18    "src/include/benchmark/export.h",
19  ]
20
21  sources = [
22    "src/src/arraysize.h",
23    "src/src/benchmark.cc",
24    "src/src/benchmark_api_internal.cc",
25    "src/src/benchmark_api_internal.h",
26    "src/src/benchmark_name.cc",
27    "src/src/benchmark_register.cc",
28    "src/src/benchmark_register.h",
29    "src/src/benchmark_runner.cc",
30    "src/src/benchmark_runner.h",
31    "src/src/check.cc",
32    "src/src/check.h",
33    "src/src/colorprint.cc",
34    "src/src/colorprint.h",
35    "src/src/commandlineflags.cc",
36    "src/src/commandlineflags.h",
37    "src/src/complexity.cc",
38    "src/src/complexity.h",
39    "src/src/console_reporter.cc",
40    "src/src/counter.cc",
41    "src/src/counter.h",
42    "src/src/csv_reporter.cc",
43    "src/src/cycleclock.h",
44    "src/src/internal_macros.h",
45    "src/src/json_reporter.cc",
46    "src/src/log.h",
47    "src/src/mutex.h",
48    "src/src/perf_counters.cc",
49    "src/src/perf_counters.h",
50    "src/src/re.h",
51    "src/src/reporter.cc",
52    "src/src/statistics.cc",
53    "src/src/statistics.h",
54    "src/src/string_util.cc",
55    "src/src/string_util.h",
56    "src/src/sysinfo.cc",
57    "src/src/thread_manager.h",
58    "src/src/thread_timer.h",
59    "src/src/timers.cc",
60    "src/src/timers.h",
61  ]
62
63  all_dependent_configs = [ ":benchmark_config" ]
64
65  configs -= [ "//build/config/compiler:chromium_code" ]
66  configs += [
67    "//build/config/compiler:no_chromium_code",
68  ]
69
70  if (is_win) {
71    configs -= [ "//build/config/win:nominmax" ]
72  }
73
74  defines = [
75    "benchmark_EXPORTS=1",
76
77    # Tell gtest to always use standard regular expressions.
78    "HAVE_GNU_POSIX_REGEX=0",
79    "HAVE_POSIX_REGEX=0",
80    "HAVE_STD_REGEX=1",
81  ]
82}
83
84component("benchmark_main") {
85  testonly = true
86  sources = [ "src/src/benchmark_main.cc" ]
87  defines = [ "benchmark_EXPORTS=1" ]
88  deps = [ ":google_benchmark" ]
89}
90