1# Copyright (C) 2019 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15import("../../../gn/perfetto_component.gni") 16import("../../../gn/test.gni") 17 18# Used by two static libs - trace_processor and libpprofbuilder, hence using 19# perfetto_component to turn this into a cc_library in bazel builds. 20# The 'public' section gets converted to 'hdrs', and is necessary for the bazel 21# build to pass strict header checks. 22perfetto_component("containers") { 23 public = [ 24 "bit_vector.h", 25 "implicit_segment_forest.h", 26 "interval_tree.h", 27 "null_term_string_view.h", 28 "row_map.h", 29 "row_map_algorithms.h", 30 "string_pool.h", 31 ] 32 sources = [ 33 "bit_vector.cc", 34 "row_map.cc", 35 "string_pool.cc", 36 ] 37 deps = [ 38 "../../../gn:default_deps", 39 "../../../include/perfetto/protozero", 40 "../../../protos/perfetto/trace_processor:zero", 41 "../../base", 42 ] 43} 44 45perfetto_unittest_source_set("unittests") { 46 testonly = true 47 sources = [ 48 "bit_vector_unittest.cc", 49 "implicit_segment_forest_unittest.cc", 50 "interval_tree_unittest.cc", 51 "null_term_string_view_unittest.cc", 52 "row_map_unittest.cc", 53 "string_pool_unittest.cc", 54 ] 55 deps = [ 56 ":containers", 57 "../../../gn:default_deps", 58 "../../../gn:gtest_and_gmock", 59 "../../../include/perfetto/protozero", 60 "../../../protos/perfetto/trace_processor:zero", 61 ] 62} 63 64if (enable_perfetto_benchmarks) { 65 source_set("benchmarks") { 66 testonly = true 67 deps = [ 68 ":containers", 69 "../../../gn:benchmark", 70 "../../../gn:default_deps", 71 "../../base", 72 ] 73 sources = [ 74 "bit_vector_benchmark.cc", 75 "row_map_algorithms_benchmark.cc", 76 "row_map_benchmark.cc", 77 ] 78 } 79} 80