blob: b4095467b1a3f1b924b4046587289444be9a5150 [file] [log] [blame]
Alexei Frolov942adf02019-12-11 17:07:28 -08001# Copyright 2019 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
Alexei Frolovf39cd8b2020-04-13 17:59:20 -070015import("$dir_pw_build/input_group.gni")
Alexei Frolov942adf02019-12-11 17:07:28 -080016import("$dir_pw_docgen/docs.gni")
Alexei Frolovf39cd8b2020-04-13 17:59:20 -070017import("$dir_pw_protobuf_compiler/proto.gni")
18import("$dir_pw_unit_test/test.gni")
Alexei Frolov942adf02019-12-11 17:07:28 -080019
20pw_doc_group("docs") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080021 sources = [ "docs.rst" ]
Alexei Frolov942adf02019-12-11 17:07:28 -080022}
Alexei Frolovf39cd8b2020-04-13 17:59:20 -070023
24_compiling_for_nanopb = pw_protobuf_generators + [ "nanopb" ] - [ "nanopb" ] !=
25 pw_protobuf_generators
26
27pw_test_group("tests") {
28 tests = []
29 if (_compiling_for_nanopb) {
30 tests += [ ":nanopb_test" ]
31 }
32}
33
34if (_compiling_for_nanopb) {
35 pw_test("nanopb_test") {
36 deps = [ ":nanopb_test_protos_nanopb" ]
37 sources = [ "nanopb_test.cc" ]
38 }
39
40 pw_proto_library("nanopb_test_protos") {
41 sources = [ "pw_protobuf_compiler_protos/nanopb_test.proto" ]
42 }
43} else {
44 pw_input_group("not_needed") {
45 inputs = [ "nanopb_test.cc" ]
46 }
47}