Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame] | 1 | # 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 Montanez | fb3d3fb | 2020-06-09 18:12:12 -0700 | [diff] [blame] | 15 | import("//build_overrides/pigweed.gni") |
| 16 | |
Alexei Frolov | edd2f14 | 2020-06-09 19:11:27 -0700 | [diff] [blame] | 17 | import("$dir_pw_build/target_types.gni") |
Wyatt Hepler | ee3e02f | 2019-12-05 10:52:31 -0800 | [diff] [blame] | 18 | import("$dir_pw_docgen/docs.gni") |
Wyatt Hepler | b667928 | 2019-11-12 22:40:17 -0800 | [diff] [blame] | 19 | import("$dir_pw_unit_test/test.gni") |
Wyatt Hepler | d49f8fe | 2020-10-15 10:13:47 -0700 | [diff] [blame] | 20 | |
Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame] | 21 | config("default_config") { |
| 22 | include_dirs = [ "public" ] |
| 23 | } |
| 24 | |
Alexei Frolov | edd2f14 | 2020-06-09 19:11:27 -0700 | [diff] [blame] | 25 | pw_source_set("pw_status") { |
Wyatt Hepler | 2119240 | 2020-01-15 15:40:51 -0800 | [diff] [blame] | 26 | public_configs = [ ":default_config" ] |
Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame] | 27 | public = [ |
| 28 | "public/pw_status/status.h", |
Wyatt Hepler | b667928 | 2019-11-12 22:40:17 -0800 | [diff] [blame] | 29 | "public/pw_status/status_with_size.h", |
David Rogers | b6b14b8 | 2020-09-11 16:27:27 -0700 | [diff] [blame] | 30 | "public/pw_status/try.h", |
Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame] | 31 | ] |
Wyatt Hepler | 7e3f1d9 | 2020-08-07 14:09:03 -0700 | [diff] [blame] | 32 | sources = [ "status.cc" ] |
Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame] | 33 | } |
Wyatt Hepler | b667928 | 2019-11-12 22:40:17 -0800 | [diff] [blame] | 34 | |
Alexei Frolov | a454c68 | 2019-11-19 10:55:07 -0800 | [diff] [blame] | 35 | pw_test_group("tests") { |
| 36 | tests = [ |
| 37 | ":status_test", |
| 38 | ":status_with_size_test", |
David Rogers | b6b14b8 | 2020-09-11 16:27:27 -0700 | [diff] [blame] | 39 | ":try_test", |
Alexei Frolov | a454c68 | 2019-11-19 10:55:07 -0800 | [diff] [blame] | 40 | ] |
| 41 | } |
| 42 | |
Wyatt Hepler | b667928 | 2019-11-12 22:40:17 -0800 | [diff] [blame] | 43 | pw_test("status_test") { |
Rob Mohr | a0ba54f | 2020-02-27 11:43:49 -0800 | [diff] [blame] | 44 | deps = [ ":pw_status" ] |
Wyatt Hepler | b667928 | 2019-11-12 22:40:17 -0800 | [diff] [blame] | 45 | sources = [ |
| 46 | "status_test.cc", |
Michael Spang | a99220e | 2020-06-11 20:07:16 -0400 | [diff] [blame] | 47 | "status_test_c.c", |
Wyatt Hepler | b667928 | 2019-11-12 22:40:17 -0800 | [diff] [blame] | 48 | ] |
| 49 | } |
| 50 | |
| 51 | pw_test("status_with_size_test") { |
Rob Mohr | a0ba54f | 2020-02-27 11:43:49 -0800 | [diff] [blame] | 52 | deps = [ ":pw_status" ] |
| 53 | sources = [ "status_with_size_test.cc" ] |
Wyatt Hepler | b667928 | 2019-11-12 22:40:17 -0800 | [diff] [blame] | 54 | } |
Wyatt Hepler | ee3e02f | 2019-12-05 10:52:31 -0800 | [diff] [blame] | 55 | |
David Rogers | b6b14b8 | 2020-09-11 16:27:27 -0700 | [diff] [blame] | 56 | pw_test("try_test") { |
| 57 | deps = [ ":pw_status" ] |
| 58 | sources = [ "try_test.cc" ] |
| 59 | } |
| 60 | |
Wyatt Hepler | ee3e02f | 2019-12-05 10:52:31 -0800 | [diff] [blame] | 61 | pw_doc_group("docs") { |
Rob Mohr | a0ba54f | 2020-02-27 11:43:49 -0800 | [diff] [blame] | 62 | sources = [ "docs.rst" ] |
Wyatt Hepler | ee3e02f | 2019-12-05 10:52:31 -0800 | [diff] [blame] | 63 | } |