blob: b8bcc2b56a0adb3773733e15256d0ace4f470404 [file] [log] [blame]
# 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/components.gni")
import("//build/test.gni")
static_library("line_input") {
sources = [
"line_input.cc",
"line_input.h",
"modal_line_input.cc",
"modal_line_input.h",
]
deps = []
public_deps = [
"//sdk/lib/fit",
"//sdk/lib/syslog/cpp",
"//src/lib/fxl",
]
configs += [
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
"//build/config:Wno-conversion",
]
}
if (is_host) {
test("line_input_tests") {
sources = [
"line_input_unittest.cc",
"modal_line_input_unittest.cc",
"test_line_input.h",
]
deps = [
":line_input",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
}
# Currently compiled for the host only, but could be packaged for the target if desired.
executable("line_input_example") {
sources = [ "line_input_example.cc" ]
deps = [ ":line_input" ]
configs += [
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
"//build/config:Wno-conversion",
]
}
} else {
executable("line_input_tests_bin") {
testonly = true
sources = [
"line_input_unittest.cc",
"modal_line_input_unittest.cc",
"test_line_input.h",
]
deps = [
":line_input",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
}
fuchsia_unittest_package("line_input_tests") {
deps = [ ":line_input_tests_bin" ]
}
}
group("tests") {
testonly = true
deps = [
":line_input_example($host_toolchain)",
":line_input_tests",
":line_input_tests($host_toolchain)",
]
}