11cb0ef41Sopenharmony_ci# Copyright 2020 The V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci# found in the LICENSE file. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciimport("//build/config/gclient_args.gni") 61cb0ef41Sopenharmony_ciimport("../../gni/v8.gni") 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciif (v8_enable_google_benchmark) { 91cb0ef41Sopenharmony_ci config("benchmark_config") { 101cb0ef41Sopenharmony_ci include_dirs = [ 111cb0ef41Sopenharmony_ci "src/include", 121cb0ef41Sopenharmony_ci "precompiled_headers", 131cb0ef41Sopenharmony_ci ] 141cb0ef41Sopenharmony_ci } 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_ci source_set("google_benchmark") { 171cb0ef41Sopenharmony_ci testonly = true 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ci public = [ "src/include/benchmark/benchmark.h" ] 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ci sources = [ 221cb0ef41Sopenharmony_ci "src/src/arraysize.h", 231cb0ef41Sopenharmony_ci "src/src/benchmark.cc", 241cb0ef41Sopenharmony_ci "src/src/benchmark_api_internal.cc", 251cb0ef41Sopenharmony_ci "src/src/benchmark_api_internal.h", 261cb0ef41Sopenharmony_ci "src/src/benchmark_name.cc", 271cb0ef41Sopenharmony_ci "src/src/benchmark_register.cc", 281cb0ef41Sopenharmony_ci "src/src/benchmark_register.h", 291cb0ef41Sopenharmony_ci "src/src/benchmark_runner.cc", 301cb0ef41Sopenharmony_ci "src/src/benchmark_runner.h", 311cb0ef41Sopenharmony_ci "src/src/check.cc", 321cb0ef41Sopenharmony_ci "src/src/check.h", 331cb0ef41Sopenharmony_ci "src/src/colorprint.cc", 341cb0ef41Sopenharmony_ci "src/src/colorprint.h", 351cb0ef41Sopenharmony_ci "src/src/commandlineflags.cc", 361cb0ef41Sopenharmony_ci "src/src/commandlineflags.h", 371cb0ef41Sopenharmony_ci "src/src/complexity.cc", 381cb0ef41Sopenharmony_ci "src/src/complexity.h", 391cb0ef41Sopenharmony_ci "src/src/console_reporter.cc", 401cb0ef41Sopenharmony_ci "src/src/counter.cc", 411cb0ef41Sopenharmony_ci "src/src/counter.h", 421cb0ef41Sopenharmony_ci "src/src/csv_reporter.cc", 431cb0ef41Sopenharmony_ci "src/src/cycleclock.h", 441cb0ef41Sopenharmony_ci "src/src/internal_macros.h", 451cb0ef41Sopenharmony_ci "src/src/json_reporter.cc", 461cb0ef41Sopenharmony_ci "src/src/log.h", 471cb0ef41Sopenharmony_ci "src/src/mutex.h", 481cb0ef41Sopenharmony_ci "src/src/perf_counters.cc", 491cb0ef41Sopenharmony_ci "src/src/perf_counters.h", 501cb0ef41Sopenharmony_ci "src/src/re.h", 511cb0ef41Sopenharmony_ci "src/src/reporter.cc", 521cb0ef41Sopenharmony_ci "src/src/sleep.cc", 531cb0ef41Sopenharmony_ci "src/src/sleep.h", 541cb0ef41Sopenharmony_ci "src/src/statistics.cc", 551cb0ef41Sopenharmony_ci "src/src/statistics.h", 561cb0ef41Sopenharmony_ci "src/src/string_util.cc", 571cb0ef41Sopenharmony_ci "src/src/string_util.h", 581cb0ef41Sopenharmony_ci "src/src/sysinfo.cc", 591cb0ef41Sopenharmony_ci "src/src/thread_manager.h", 601cb0ef41Sopenharmony_ci "src/src/thread_timer.h", 611cb0ef41Sopenharmony_ci "src/src/timers.cc", 621cb0ef41Sopenharmony_ci "src/src/timers.h", 631cb0ef41Sopenharmony_ci ] 641cb0ef41Sopenharmony_ci 651cb0ef41Sopenharmony_ci all_dependent_configs = [ ":benchmark_config" ] 661cb0ef41Sopenharmony_ci 671cb0ef41Sopenharmony_ci defines = [ 681cb0ef41Sopenharmony_ci # Tell google_benchmark to always use standard regular expressions. 691cb0ef41Sopenharmony_ci "HAVE_GNU_POSIX_REGEX=0", 701cb0ef41Sopenharmony_ci "HAVE_POSIX_REGEX=0", 711cb0ef41Sopenharmony_ci "HAVE_STD_REGEX=1", 721cb0ef41Sopenharmony_ci ] 731cb0ef41Sopenharmony_ci } 741cb0ef41Sopenharmony_ci 751cb0ef41Sopenharmony_ci source_set("benchmark_main") { 761cb0ef41Sopenharmony_ci testonly = true 771cb0ef41Sopenharmony_ci sources = [ "src/src/benchmark_main.cc" ] 781cb0ef41Sopenharmony_ci public_deps = [ ":google_benchmark" ] 791cb0ef41Sopenharmony_ci } 801cb0ef41Sopenharmony_ci} 81