blob: 8cd70f76e2a9cc50168a93bea7b71bd6945755f9 [file] [log] [blame]
# Copyright 2018 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/test.gni")
import("//third_party/protobuf/proto_library.gni")
config("cc17") {
cflags_cc = [ "-std=c++17" ]
}
source_set("headers") {
sources = [
"dockyard.h",
"dockyard_service_impl.h",
]
public_deps = [
":proto",
"//src/developer/system_monitor/lib:lib",
"//third_party/grpc:grpc++",
]
}
source_set("lib") {
configs += [ ":cc17" ]
sources = [
"dockyard.cc",
"dockyard_service_impl.cc",
]
public_deps = [ ":headers" ]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
proto_library("proto") {
sources = [ "../proto/dockyard.proto" ]
generate_python = false
cc_generator_options = "lite"
generator_plugin_suffix = ".grpc.pb"
generator_plugin_label = "//third_party/grpc:grpc_cpp_plugin"
deps = [ "//third_party/grpc:grpc++" ]
}
static_library("dockyard") {
output_name = "dockyard"
complete_static_lib = true
deps = [ ":lib" ]
}
group("libdockyard") {
public_deps = [ ":dockyard($host_toolchain)" ]
}
group("tests") {
testonly = true
deps = [ ":dockyard_tests" ]
}
test("dockyard_tests") {
testonly = true
sources = [
"dockyard_test.cc",
"test_sample_generator.cc",
"test_sample_generator.h",
]
deps = [
":lib",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}