summaryrefslogtreecommitdiff
path: root/deps/v8/third_party/google_benchmark/BUILD.gn
blob: e746cc421a00d3c2a4837f4d30b7958b12c55177 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# 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")
import("../../gni/v8.gni")

if (v8_enable_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/internal_macros.h",
      "src/src/json_reporter.cc",
      "src/src/log.h",
      "src/src/mutex.h",
      "src/src/perf_counters.cc",
      "src/src/perf_counters.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" ]
    public_deps = [ ":google_benchmark" ]
  }
}