blob: 61f4797aaffb919b355e6cdc4df15c957cf8067c [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
# TODO(b/256272529): Figure out why this needs to be disabled on
# mimxrt595_evk.
if (host_os == "linux" ||
(get_label_info(current_toolchain, "name") != "host_debug" &&
pw_build_EXECUTABLE_TARGET_TYPE != "mimxrt595_executable")) {
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_span",
"$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" ]
}