blob: e36b1829b1f0805ac3570ba6bd8bebbf8409bfe9 [file] [log] [blame]
Armando Montanez28698d02021-08-11 12:19:40 -07001# 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")
Armando Montanez5be54582021-09-02 13:58:52 -070019import("$dir_pw_unit_test/test.gni")
20
21config("public_includes") {
22 include_dirs = [ "public" ]
23}
Armando Montanez28698d02021-08-11 12:19:40 -070024
25pw_proto_library("proto") {
26 sources = [ "file.proto" ]
27 prefix = "pw_file"
28 deps = [ "$dir_pw_protobuf:common_protos" ]
29}
30
Armando Montanez5be54582021-09-02 13:58:52 -070031pw_source_set("flat_file_system") {
32 public_deps = [
33 ":proto.pwpb",
34 ":proto.raw_rpc",
Armando Montanez5be54582021-09-02 13:58:52 -070035 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 Montanez28698d02021-08-11 12:19:40 -070046pw_doc_group("docs") {
47 sources = [ "docs.rst" ]
48 inputs = [ "file.proto" ]
49}
Armando Montanez5be54582021-09-02 13:58:52 -070050
51pw_test_group("tests") {
52 tests = [ ":flat_file_system_test" ]
53}
54
55pw_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}