xref: /aosp_15_r20/external/perfetto/src/trace_processor/sqlite/BUILD.gn (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
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/test.gni")
16
17assert(enable_perfetto_trace_processor_sqlite)
18
19source_set("sqlite") {
20  sources = [
21    "db_sqlite_table.cc",
22    "db_sqlite_table.h",
23    "module_lifecycle_manager.h",
24    "scoped_db.h",
25    "sql_source.cc",
26    "sql_source.h",
27    "sql_stats_table.cc",
28    "sql_stats_table.h",
29    "sqlite_engine.cc",
30    "sqlite_engine.h",
31    "sqlite_utils.cc",
32    "sqlite_utils.h",
33    "stats_table.cc",
34    "stats_table.h",
35  ]
36  deps = [
37    "..:metatrace",
38    "../../../gn:default_deps",
39    "../../../gn:sqlite",
40    "../../../include/perfetto/trace_processor",
41    "../../../include/perfetto/trace_processor:basic_types",
42    "../../../protos/perfetto/trace/ftrace:zero",
43    "../../../protos/perfetto/trace_processor:zero",
44    "../../base",
45    "../containers",
46    "../db",
47    "../db/column",
48    "../importers/common",
49    "../importers/ftrace:ftrace_descriptors",
50    "../perfetto_sql/intrinsics/table_functions:interface",
51    "../storage",
52    "../types",
53    "../util",
54    "../util:profile_builder",
55    "../util:regex",
56  ]
57  public_deps = [ "bindings" ]
58}
59
60perfetto_unittest_source_set("unittests") {
61  testonly = true
62  sources = [
63    "db_sqlite_table_unittest.cc",
64    "sql_source_unittest.cc",
65    "sqlite_utils_unittest.cc",
66  ]
67  deps = [
68    ":sqlite",
69    "../../../gn:default_deps",
70    "../../../gn:gtest_and_gmock",
71    "../../../gn:sqlite",
72    "../../../include/perfetto/trace_processor:basic_types",
73    "../../base",
74    "../../base:test_support",
75    "../db",
76  ]
77}
78
79if (enable_perfetto_benchmarks) {
80  source_set("benchmarks") {
81    testonly = true
82    deps = [
83      ":sqlite",
84      "../../../gn:benchmark",
85      "../../../gn:default_deps",
86      "../../../gn:sqlite",
87      "../../base",
88    ]
89    sources = [ "sqlite_vtable_benchmark.cc" ]
90  }
91}
92