1# Copyright 2021 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15import("//build_overrides/pigweed.gni") 16 17import("$dir_pw_docgen/docs.gni") 18import("$dir_pw_protobuf_compiler/proto.gni") 19import("$dir_pw_unit_test/test.gni") 20 21config("public_includes") { 22 include_dirs = [ "public" ] 23} 24 25pw_proto_library("proto") { 26 sources = [ "file.proto" ] 27 prefix = "pw_file" 28 deps = [ "$dir_pw_protobuf:common_protos" ] 29 python_package = "py" 30} 31 32pw_source_set("flat_file_system") { 33 public_deps = [ 34 ":proto.pwpb", 35 ":proto.raw_rpc", 36 dir_pw_assert, 37 dir_pw_bytes, 38 dir_pw_log, 39 dir_pw_result, 40 dir_pw_span, 41 dir_pw_status, 42 ] 43 public_configs = [ ":public_includes" ] 44 public = [ "public/pw_file/flat_file_system.h" ] 45 sources = [ "flat_file_system.cc" ] 46} 47 48pw_doc_group("docs") { 49 sources = [ "docs.rst" ] 50 inputs = [ "file.proto" ] 51} 52 53pw_test_group("tests") { 54 tests = [ ":flat_file_system_test" ] 55} 56 57pw_test("flat_file_system_test") { 58 deps = [ 59 ":flat_file_system", 60 ":proto.pwpb", 61 "$dir_pw_rpc/raw:test_method_context", 62 dir_pw_bytes, 63 dir_pw_protobuf, 64 dir_pw_status, 65 ] 66 sources = [ "flat_file_system_test.cc" ] 67} 68