blob: 6c59ed5e5d278edfd4f9a5cb4e10d566627c4023 [file] [log] [blame] [edit]
# Copyright 2022 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.
# [START imports]
import("//build/components.gni")
# [END imports]
group("tests") {
testonly = true
deps = [ ":echo-cpp-unittests" ]
}
# [START executable]
executable("bin") {
output_name = "echo_example_cpp"
sources = [ "main.cc" ]
deps = [
":cpp-lib",
"//sdk/lib/syslog/cpp",
"//zircon/system/ulib/async-default",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
source_set("cpp-lib") {
sources = [
"echo_component.cc",
"echo_component.h",
]
}
# [END executable]
# [START component]
fuchsia_component("component") {
component_name = "echo_cpp"
manifest = "meta/echo.cml"
deps = [ ":bin" ]
}
# [END component]
#[START unittest]
executable("unittests") {
output_name = "echo-cpp-test"
testonly = true
sources = [ "echo_unittest.cc" ]
deps = [
":cpp-lib",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
}
fuchsia_unittest_package("echo-cpp-unittests") {
deps = [ ":unittests" ]
}
#[END unittest]