# 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/test.gni")

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 = [
    "../../../gn:default_deps",
    "../../../include/perfetto/ext/base",
    "../db",
  ]
}

source_set("unittests") {
  testonly = true
  sources = [ "macros_unittest.cc" ]
  deps = [
    ":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" ]
  }
}
