1 # Copyright (C) 2018 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 15 import("../../gn/perfetto.gni") 16 import("../../gn/proto_library.gni") 17 18 source_set("perfetto_cmd") { 19 public_deps = [ 20 ":protos", 21 "../../include/perfetto/traced", 22 ] 23 deps = [ 24 "../../gn:default_deps", 25 "../../protos/perfetto/config", 26 "../base", 27 "../protozero", 28 "../tracing:ipc_consumer", 29 ] 30 sources = [ 31 "perfetto_cmd.cc", 32 "perfetto_cmd.h", 33 "rate_limiter.cc", 34 "rate_limiter.h", 35 ] 36 } 37 38 proto_library("protos") { 39 generate_python = false 40 deps = [] 41 sources = [ 42 "perfetto_cmd_state.proto", 43 ] 44 proto_in_dir = perfetto_root_path 45 proto_out_dir = perfetto_root_path 46 } 47 48 source_set("unittests") { 49 testonly = true 50 public_deps = [] 51 deps = [ 52 ":perfetto_cmd", 53 "../../gn:default_deps", 54 "../../gn:gtest_deps", 55 ] 56 sources = [ 57 "rate_limiter_unittest.cc", 58 ] 59 } 60