• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 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_build/target_types.gni")
18
19pw_executable("noop_checksum") {
20  sources = [ "run_checksum.cc" ]
21  deps = [
22    "$dir_pw_bloat:bloat_this_binary",
23    "$dir_pw_log",
24    "$dir_pw_preprocessor",
25    "$dir_pw_span",
26    "..",
27  ]
28  defines = [ "USE_NOOP_CHECKSUM=1" ]
29
30  # TODO: b/259746255 - Remove this when everything compiles with -Wconversion.
31  configs = [ "$dir_pw_build:conversion_warnings" ]
32}
33
34pw_executable("crc32_8bit_checksum") {
35  sources = [ "run_checksum.cc" ]
36  deps = [
37    "$dir_pw_bloat:bloat_this_binary",
38    "$dir_pw_log",
39    "$dir_pw_preprocessor",
40    "$dir_pw_span",
41    "..",
42  ]
43  defines = [ "USE_CRC32_8BIT_CHECKSUM=1" ]
44
45  # TODO: b/259746255 - Remove this when everything compiles with -Wconversion.
46  configs = [ "$dir_pw_build:conversion_warnings" ]
47}
48
49pw_executable("crc32_4bit_checksum") {
50  sources = [ "run_checksum.cc" ]
51  deps = [
52    "$dir_pw_bloat:bloat_this_binary",
53    "$dir_pw_log",
54    "$dir_pw_preprocessor",
55    "$dir_pw_span",
56    "..",
57  ]
58  defines = [ "USE_CRC32_4BIT_CHECKSUM=1" ]
59
60  # TODO: b/259746255 - Remove this when everything compiles with -Wconversion.
61  configs = [ "$dir_pw_build:conversion_warnings" ]
62}
63
64pw_executable("crc32_1bit_checksum") {
65  sources = [ "run_checksum.cc" ]
66  deps = [
67    "$dir_pw_bloat:bloat_this_binary",
68    "$dir_pw_log",
69    "$dir_pw_preprocessor",
70    "$dir_pw_span",
71    "..",
72  ]
73  defines = [ "USE_CRC32_1BIT_CHECKSUM=1" ]
74
75  # TODO: b/259746255 - Remove this when everything compiles with -Wconversion.
76  configs = [ "$dir_pw_build:conversion_warnings" ]
77}
78
79pw_executable("crc16_checksum") {
80  sources = [ "run_checksum.cc" ]
81  deps = [
82    "$dir_pw_bloat:bloat_this_binary",
83    "$dir_pw_log",
84    "$dir_pw_preprocessor",
85    "$dir_pw_span",
86    "..",
87  ]
88  defines = [ "USE_CRC16_CHECKSUM=1" ]
89
90  # TODO: b/259746255 - Remove this when everything compiles with -Wconversion.
91  configs = [ "$dir_pw_build:conversion_warnings" ]
92}
93
94pw_executable("fletcher16_checksum") {
95  sources = [ "run_checksum.cc" ]
96  deps = [
97    "$dir_pw_bloat:bloat_this_binary",
98    "$dir_pw_log",
99    "$dir_pw_preprocessor",
100    "$dir_pw_span",
101    "..",
102  ]
103  defines = [ "USE_FLETCHER16_CHECKSUM=1" ]
104
105  # TODO: b/259746255 - Remove this when everything compiles with -Wconversion.
106  configs = [ "$dir_pw_build:conversion_warnings" ]
107}
108