blob: 7974be52444bdb9641c56ecdcf449d08ae00a7fe [file] [log] [blame]
# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
import("//build_overrides/pigweed.gni")
import("$dir_pw_build/target_types.gni")
import("$dir_pw_tokenizer/database.gni")
import("$dir_pw_unit_test/test.gni")
group("all") {
deps = [ ":string_demo" ]
# Build tokenizer_database for elf binaries only
if (host_os == "linux" || current_toolchain != "//targets/host:host_debug") {
deps += [ ":tokenizer_database" ]
}
}
pw_executable("string_demo") {
sources = [ "string_demo.cc" ]
deps = [
"$dir_pw_board_led",
"$dir_pw_hex_dump",
"$dir_pw_log",
"$dir_pw_spin_delay",
"$dir_pw_string",
]
}
pw_source_set("system_status") {
public = [ "system_status.h" ]
public_deps = [ "$dir_pw_string" ]
sources = [ "system_status.cc" ]
}
pw_tokenizer_database("tokenizer_database") {
database = "tokenizer_database.csv"
targets = [ ":string_demo" ]
}
pw_test("system_status_test") {
deps = [ ":system_status" ]
sources = [ "system_status_test.cc" ]
}
pw_test_group("tests") {
tests = [ ":system_status_test" ]
}