1# Copyright 2020 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 15include($ENV{PW_ROOT}/pw_build/pigweed.cmake) 16 17pw_add_library(pw_checksum STATIC 18 HEADERS 19 public/pw_checksum/crc16_ccitt.h 20 public/pw_checksum/crc32.h 21 PUBLIC_INCLUDES 22 public 23 PUBLIC_DEPS 24 pw_bytes 25 pw_span 26 SOURCES 27 crc16_ccitt.cc 28 crc32.cc 29) 30 31# TODO: b/284002266 - Unresolved linker error when using pw_checksum above. 32# Created this crc32 library and linker error is resolved. 33pw_add_library(pw_checksum.crc32 STATIC 34 HEADERS 35 public/pw_checksum/crc32.h 36 PUBLIC_INCLUDES 37 public 38 PUBLIC_DEPS 39 pw_bytes 40 pw_span 41 SOURCES 42 crc32.cc 43) 44 45pw_add_test(pw_checksum.crc16_ccitt_test 46 SOURCES 47 crc16_ccitt_test.cc 48 crc16_ccitt_test_c.c 49 PRIVATE_DEPS 50 pw_checksum 51 pw_random 52 GROUPS 53 modules 54 pw_checksum 55) 56 57pw_add_test(pw_checksum.crc32_test 58 SOURCES 59 crc32_test.cc 60 crc32_test_c.c 61 PRIVATE_DEPS 62 pw_checksum 63 pw_random 64 GROUPS 65 modules 66 pw_checksum 67) 68