From cc02325a4ece1218cc15d8dedf17734944abe217 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 2 Jul 2020 16:03:45 +0200 Subject: [PATCH] test/crypto: add CMake project --- test/crypto/CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++ test/crypto/Makefile | 3 --- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 test/crypto/CMakeLists.txt diff --git a/test/crypto/CMakeLists.txt b/test/crypto/CMakeLists.txt new file mode 100644 index 000000000..bdc53e809 --- /dev/null +++ b/test/crypto/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required (VERSION 3.5) + +project(test-crypto) + +include_directories(../../3rd-party/micro-ecc) +include_directories(../../3rd-party/rijndael) +include_directories(../../src) +include_directories(..) + +add_executable(aes_ccm_test + ../../3rd-party/rijndael/rijndael.c + ../../src/btstack_crypto.c + ../../src/btstack_linked_list.c + ../../src/hci_cmd.c + ../../src/btstack_util.c + ../../src/hci_dump.c + aes_ccm.c + aes_ccm_test.c + aes_cmac.c + mock.c +) + +add_executable(aestest + ../../3rd-party/rijndael/rijndael.c + aestest.c +) + +add_executable(ecc_micro_ecc + ../../3rd-party/micro-ecc/uECC.c + ecc_micro_ecc.c +) + +add_executable(aes_cmac_test + ../../3rd-party/rijndael/rijndael.c + aes_cmac_test.c + aes_cmac.c +) diff --git a/test/crypto/Makefile b/test/crypto/Makefile index 282d22bff..3130fd33a 100644 --- a/test/crypto/Makefile +++ b/test/crypto/Makefile @@ -41,9 +41,6 @@ ecc_micro_ecc: ecc_micro_ecc.o ${MICROECC} aes_cmac_test: aes_cmac_test.o aes_cmac.o rijndael.o gcc ${CFLAGS} $^ -o $@ -sm_mbedtls_allocator_test: sm_mbedtls_allocator.o hci_dump.o btstack_util.o sm_mbedtls_allocator_test.c - ${CC} sm_mbedtls_allocator.o btstack_util.o hci_dump.o sm_mbedtls_allocator_test.c ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ - test: all ./aes_cmac_test ./aestest