# 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_tp_tables.gni")
import("../../../gn/test.gni")

source_set("minimal") {
  sources = [
    "base_id.h",
    "column.cc",
    "column.h",
    "column_storage.cc",
    "column_storage.h",
    "column_storage_overlay.h",
    "compare.h",
    "query_executor.cc",
    "query_executor.h",
    "table.cc",
    "table.h",
    "typed_column.h",
    "typed_column_internal.h",
  ]
  deps = [
    "../../../gn:default_deps",
    "../../../include/perfetto/trace_processor",
    "../../base",
    "../containers",
    "../util:glob",
    "../util:regex",
    "../util:util",
    "column",
  ]
}

source_set("db") {
  sources = [
    "runtime_table.cc",
    "runtime_table.h",
  ]
  deps = [
    "../../../gn:default_deps",
    "../../../include/perfetto/trace_processor",
    "../../base",
    "../containers",
    "column",
  ]
  public_deps = [ ":minimal" ]
}

source_set("compare") {
  sources = [ "compare.h" ]
  deps = [
    "../../../include/perfetto/trace_processor",
    "../containers",
  ]
}

perfetto_unittest_source_set("unittests") {
  testonly = true
  sources = [
    "column_storage_overlay_unittest.cc",
    "compare_unittest.cc",
    "query_executor_unittest.cc",
    "runtime_table_unittest.cc",
  ]
  deps = [
    ":db",
    "../../../gn:default_deps",
    "../../../gn:gtest_and_gmock",
    "../../../include/perfetto/trace_processor:basic_types",
    "../../base",
    "../../base:test_support",
    "../containers",
    "../tables",
    "column",
    "column:fake_storage",
  ]
}

if (enable_perfetto_benchmarks) {
  source_set("benchmarks") {
    testonly = true
    deps = [
      ":db",
      "../../../gn:benchmark",
      "../../../gn:default_deps",
      "../../../include/perfetto/base",
      "../../../include/perfetto/ext/base",
      "../../../include/perfetto/trace_processor:basic_types",
      "../../base:test_support",
      "../containers",
      "../tables:tables_python",
      "column",
    ]
    sources = [
      "column_storage_overlay_benchmark.cc",
      "query_executor_benchmark.cc",
    ]
  }
}
