# 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")

perfetto_tp_tables("tables_python") {
  sources = [
    "android_tables.py",
    "metadata_tables.py",
  ]
  generate_docs = true
}

source_set("tables") {
  sources = [
    "android_tables.h",
    "counter_tables.h",
    "flow_tables.h",
    "macros.h",
    "macros_internal.h",
    "memory_tables.h",
    "metadata_tables.h",
    "profiler_tables.h",
    "slice_tables.h",
    "table_destructors.cc",
    "trace_proto_tables.h",
    "track_tables.h",
  ]
  deps = [
    ":tables_python",
    "../../../gn:default_deps",
    "../../../include/perfetto/ext/base",
    "../db",
  ]
}

perfetto_tp_tables("py_tables_unittest") {
  sources = [ "py_tables_unittest.py" ]
  generate_docs = true
}

source_set("unittests") {
  testonly = true
  sources = [
    "macros_unittest.cc",
    "py_tables_unittest.cc",
  ]
  deps = [
    ":py_tables_unittest",
    ":tables",
    "../../../gn:default_deps",
    "../../../gn:gtest_and_gmock",
  ]
}

if (enable_perfetto_benchmarks) {
  source_set("benchmarks") {
    testonly = true
    deps = [
      ":tables",
      "../../../gn:benchmark",
      "../../../gn:default_deps",
    ]
    sources = [ "macros_benchmark.cc" ]
  }
}
