# Copyright (C) 2019 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("../../../gn/perfetto_component.gni")
import("../../../gn/test.gni")

# Used by two static libs - trace_processor and libpprofbuilder, hence using
# perfetto_component to turn this into a cc_library in bazel builds.
# The 'public' section gets converted to 'hdrs', and is necessary for the bazel
# build to pass strict header checks.
perfetto_component("containers") {
  public = [
    "bit_vector.h",
    "implicit_segment_forest.h",
    "interval_intersector.h",
    "interval_tree.h",
    "null_term_string_view.h",
    "row_map.h",
    "row_map_algorithms.h",
    "string_pool.h",
  ]
  sources = [
    "bit_vector.cc",
    "row_map.cc",
    "string_pool.cc",
  ]
  deps = [
    "../../../gn:default_deps",
    "../../../include/perfetto/protozero",
    "../../../protos/perfetto/trace_processor:zero",
    "../../base",
  ]
}

perfetto_unittest_source_set("unittests") {
  testonly = true
  sources = [
    "bit_vector_unittest.cc",
    "implicit_segment_forest_unittest.cc",
    "interval_intersector_unittest.cc",
    "interval_tree_unittest.cc",
    "null_term_string_view_unittest.cc",
    "row_map_unittest.cc",
    "string_pool_unittest.cc",
  ]
  deps = [
    ":containers",
    "../../../gn:default_deps",
    "../../../gn:gtest_and_gmock",
    "../../../include/perfetto/protozero",
    "../../../protos/perfetto/trace_processor:zero",
  ]
}

if (enable_perfetto_benchmarks) {
  source_set("benchmarks") {
    testonly = true
    deps = [
      ":containers",
      "../../../gn:benchmark",
      "../../../gn:default_deps",
      "../../base",
    ]
    sources = [
      "bit_vector_benchmark.cc",
      "row_map_algorithms_benchmark.cc",
      "row_map_benchmark.cc",
    ]
  }
}
