blob: a6cb2cb364f14db15ce86edde7d3c2bbf67f06cc [file] [log] [blame] [edit]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/host.gni")
import("//build/sdk/sdk_host_tool.gni")
import("//build/test.gni")
import("//build/testing/environments.gni")
if (is_host) {
executable("fidlcat") {
output_name = "fidlcat"
sources = [ "main.cc" ]
deps = [
":lib",
"//sdk/lib/fidl_base",
"//sdk/lib/syslog/cpp",
"//src/developer/debug/ipc",
"//src/developer/debug/zxdb/client",
"//src/developer/debug/zxdb/common",
"//src/lib/fidl_codec",
"//src/lib/fxl",
"//third_party/protobuf:protobuf_full",
"//third_party/rapidjson",
"//tools/fidlcat/lib:host_lib",
"//zircon/system/ulib/cmdline",
]
}
sdk_host_tool("fidlcat_sdk") {
category = "partner"
output_name = "fidlcat"
deps = [ ":fidlcat" ]
}
static_library("lib") {
public = [ "command_line_options.h" ]
sources = [ "command_line_options.cc" ]
deps = [
"//sdk/lib/syslog/cpp",
"//src/lib/fidl_codec",
"//src/lib/fxl",
"//zircon/system/ulib/cmdline",
]
public_deps = [
"//src/lib/analytics/cpp/core_dev_tools",
"//src/lib/fxl:cli",
"//third_party/re2",
]
}
test("fidlcat_host_tests") {
deps = [
":host_tests",
":lib",
"//src/lib/fxl/test:gtest_main",
"//tools/fidlcat/interception_tests:host_tests",
"//tools/fidlcat/lib:host_tests",
]
}
source_set("host_tests") {
testonly = true
sources = [ "command_line_options_test.cc" ]
deps = [
":lib",
"//sdk/lib/syslog/cpp",
"//src/lib/fxl",
"//third_party/googletest:gtest",
"//zircon/system/ulib/cmdline",
]
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
}
install_host_tools("fidlcat_host") {
deps = [ ":fidlcat" ]
outputs = [ "fidlcat" ]
}
group("tests") {
testonly = true
deps = [
":fidlcat_host_tests($host_toolchain)",
"tests",
]
}