blob: c1d70868a21163ec6118e5d4b8fa2ae24cc92e63 [file] [log] [blame]
Alexei Frolov1a82c142019-10-31 17:37:12 -07001# 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
Armando Montanezfb3d3fb2020-06-09 18:12:12 -070015import("//build_overrides/pigweed.gni")
16
Alexei Frolovedd2f142020-06-09 19:11:27 -070017import("$dir_pw_build/target_types.gni")
Wyatt Hepleree3e02f2019-12-05 10:52:31 -080018import("$dir_pw_docgen/docs.gni")
Wyatt Heplerb6679282019-11-12 22:40:17 -080019import("$dir_pw_unit_test/test.gni")
Wyatt Heplerd49f8fe2020-10-15 10:13:47 -070020
Alexei Frolov1a82c142019-10-31 17:37:12 -070021config("default_config") {
22 include_dirs = [ "public" ]
23}
24
Alexei Frolovedd2f142020-06-09 19:11:27 -070025pw_source_set("pw_status") {
Wyatt Hepler21192402020-01-15 15:40:51 -080026 public_configs = [ ":default_config" ]
Alexei Frolov1a82c142019-10-31 17:37:12 -070027 public = [
28 "public/pw_status/status.h",
Wyatt Heplerb6679282019-11-12 22:40:17 -080029 "public/pw_status/status_with_size.h",
David Rogersb6b14b82020-09-11 16:27:27 -070030 "public/pw_status/try.h",
Alexei Frolov1a82c142019-10-31 17:37:12 -070031 ]
Wyatt Hepler7e3f1d92020-08-07 14:09:03 -070032 sources = [ "status.cc" ]
Alexei Frolov1a82c142019-10-31 17:37:12 -070033}
Wyatt Heplerb6679282019-11-12 22:40:17 -080034
Alexei Frolova454c682019-11-19 10:55:07 -080035pw_test_group("tests") {
36 tests = [
37 ":status_test",
38 ":status_with_size_test",
David Rogersb6b14b82020-09-11 16:27:27 -070039 ":try_test",
Alexei Frolova454c682019-11-19 10:55:07 -080040 ]
41}
42
Wyatt Heplerb6679282019-11-12 22:40:17 -080043pw_test("status_test") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080044 deps = [ ":pw_status" ]
Wyatt Heplerb6679282019-11-12 22:40:17 -080045 sources = [
46 "status_test.cc",
Michael Spanga99220e2020-06-11 20:07:16 -040047 "status_test_c.c",
Wyatt Heplerb6679282019-11-12 22:40:17 -080048 ]
49}
50
51pw_test("status_with_size_test") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080052 deps = [ ":pw_status" ]
53 sources = [ "status_with_size_test.cc" ]
Wyatt Heplerb6679282019-11-12 22:40:17 -080054}
Wyatt Hepleree3e02f2019-12-05 10:52:31 -080055
David Rogersb6b14b82020-09-11 16:27:27 -070056pw_test("try_test") {
57 deps = [ ":pw_status" ]
58 sources = [ "try_test.cc" ]
59}
60
Wyatt Hepleree3e02f2019-12-05 10:52:31 -080061pw_doc_group("docs") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080062 sources = [ "docs.rst" ]
Wyatt Hepleree3e02f2019-12-05 10:52:31 -080063}