blob: b203d76515e817117f80faa7089a1d3e5c639780 [file] [log] [blame]
# Copyright 2017 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("//third_party/protobuf/proto_library.gni")
config("proto_config") {
defines = [ "PROTO_LITE" ]
}
proto_library("cobalt_registry_proto") {
proto_in_dir = "//third_party/cobalt"
sources = [
"annotations.proto",
"cobalt_registry.proto",
"encodings.proto",
"metric_definition.proto",
"metrics.proto",
"project.proto",
"report_configs.proto",
"report_definition.proto",
"window_size.proto",
]
import_dirs = [ "//third_party/protobuf/src" ]
generate_python = false
generate_go = current_toolchain == host_toolchain
cc_generator_options = "lite"
deps = [
"//third_party/cobalt:cobalt_proto",
]
extra_configs = [
":proto_config",
"//third_party/cobalt:cobalt_config",
]
}
static_library("client_config") {
sources = [
"client_config.cc",
"client_config.h",
]
configs += [ "//third_party/cobalt:cobalt_config" ]
deps = [
":cobalt_registry_proto",
"//src/lib/fxl",
"//third_party/cobalt:cobalt_proto",
]
}
source_set("client_config_test") {
testonly = true
sources = [
"client_config_test.cc",
]
deps = [
":client_config",
":cobalt_registry_proto",
"//garnet/public/lib/fxl",
"//third_party/googletest:gtest",
]
configs += [ "//third_party/cobalt:cobalt_config" ]
}
source_set("project_configs") {
sources = [
"project_configs.cc",
"project_configs.h",
]
public_configs = [
"//third_party/cobalt:cobalt_config",
"//third_party/cobalt/config:proto_config",
]
public_deps = [
"//src/lib/fxl",
"//third_party/cobalt/config:cobalt_registry_proto",
]
}
source_set("project_configs_test") {
testonly = true
sources = [
"project_configs_test.cc",
]
deps = [
":project_configs",
"//third_party/googletest:gtest",
]
configs += [ "//third_party/cobalt:cobalt_config" ]
}
source_set("id") {
sources = [
"id.cc",
"id.h",
]
configs += [ "//third_party/cobalt:cobalt_config" ]
}
source_set("id_test") {
testonly = true
sources = [
"id_test.cc",
]
deps = [
":id",
"//third_party/gflags",
"//third_party/glog",
"//third_party/googletest:gtest",
]
configs += [ "//third_party/cobalt:cobalt_config" ]
}
source_set("packed_event_codes") {
sources = [
"packed_event_codes.cc",
"packed_event_codes.h",
]
configs += [ "//third_party/cobalt:cobalt_config" ]
}
source_set("packed_event_codes_test") {
testonly = true
sources = [
"packed_event_codes_test.cc",
]
deps = [
":packed_event_codes",
"//third_party/googletest:gtest",
]
configs += [ "//third_party/cobalt:cobalt_config" ]
}
group("tests") {
testonly = true
deps = [
":client_config_test",
":id_test",
":packed_event_codes_test",
":project_configs_test",
]
}