Armando Montanez | 28698d0 | 2021-08-11 12:19:40 -0700 | [diff] [blame] | 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 | |
| 15 | import("//build_overrides/pigweed.gni") |
| 16 | |
| 17 | import("$dir_pw_docgen/docs.gni") |
| 18 | import("$dir_pw_protobuf_compiler/proto.gni") |
Armando Montanez | 5be5458 | 2021-09-02 13:58:52 -0700 | [diff] [blame] | 19 | import("$dir_pw_unit_test/test.gni") |
| 20 | |
| 21 | config("public_includes") { |
| 22 | include_dirs = [ "public" ] |
| 23 | } |
Armando Montanez | 28698d0 | 2021-08-11 12:19:40 -0700 | [diff] [blame] | 24 | |
| 25 | pw_proto_library("proto") { |
| 26 | sources = [ "file.proto" ] |
| 27 | prefix = "pw_file" |
| 28 | deps = [ "$dir_pw_protobuf:common_protos" ] |
| 29 | } |
| 30 | |
Armando Montanez | 5be5458 | 2021-09-02 13:58:52 -0700 | [diff] [blame] | 31 | pw_source_set("flat_file_system") { |
| 32 | public_deps = [ |
| 33 | ":proto.pwpb", |
| 34 | ":proto.raw_rpc", |
Armando Montanez | 5be5458 | 2021-09-02 13:58:52 -0700 | [diff] [blame] | 35 | dir_pw_assert, |
| 36 | dir_pw_bytes, |
| 37 | dir_pw_log, |
| 38 | dir_pw_result, |
| 39 | dir_pw_status, |
| 40 | ] |
| 41 | public_configs = [ ":public_includes" ] |
| 42 | public = [ "public/pw_file/flat_file_system.h" ] |
| 43 | sources = [ "flat_file_system.cc" ] |
| 44 | } |
| 45 | |
Armando Montanez | 28698d0 | 2021-08-11 12:19:40 -0700 | [diff] [blame] | 46 | pw_doc_group("docs") { |
| 47 | sources = [ "docs.rst" ] |
| 48 | inputs = [ "file.proto" ] |
| 49 | } |
Armando Montanez | 5be5458 | 2021-09-02 13:58:52 -0700 | [diff] [blame] | 50 | |
| 51 | pw_test_group("tests") { |
| 52 | tests = [ ":flat_file_system_test" ] |
| 53 | } |
| 54 | |
| 55 | pw_test("flat_file_system_test") { |
| 56 | deps = [ |
| 57 | ":flat_file_system", |
| 58 | ":proto.pwpb", |
| 59 | "$dir_pw_rpc/raw:test_method_context", |
| 60 | dir_pw_bytes, |
| 61 | dir_pw_protobuf, |
| 62 | dir_pw_status, |
| 63 | ] |
| 64 | sources = [ "flat_file_system_test.cc" ] |
| 65 | } |