1// 2// Copyright (C) 2016 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_applicable_licenses: ["external_google-benchmark_license"], 19} 20 21// Added automatically by a large-scale-change 22license { 23 name: "external_google-benchmark_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-Apache-2.0", 27 ], 28 license_text: [ 29 "LICENSE", 30 ], 31} 32 33cc_defaults { 34 name: "libgoogle-benchmark-defaults", 35 host_supported: true, 36 local_include_dirs: ["include"], 37 vendor_available: true, 38 cflags: [ 39 "-DBENCHMARK_ANDROID", 40 "-DHAVE_POSIX_REGEX", 41 "-Werror", 42 "-Wno-deprecated-declarations", 43 ], 44 srcs: [ 45 "src/*.cc", 46 ], 47 export_include_dirs: ["include"], 48} 49 50// For benchmarks that define their own main(). 51cc_library_static { 52 name: "libgoogle-benchmark", 53 cmake_snapshot_supported: true, 54 defaults: ["libgoogle-benchmark-defaults"], 55 exclude_srcs: [ 56 "src/benchmark_main.cc", 57 ], 58} 59 60// For benchmarks that want to use the default main(). 61// Make sure this dependency is in the whole_static_libs attribute. 62cc_library_static { 63 name: "libgoogle-benchmark-main", 64 defaults: ["libgoogle-benchmark-defaults"], 65} 66 67cc_test { 68 name: "google-benchmark-test", 69 srcs: ["test/basic_test.cc"], 70 static_libs: ["libgoogle-benchmark"], 71} 72