1*5bc527feSMatthias Ringwaldcmake_minimum_required (VERSION 3.5) 2*5bc527feSMatthias Ringwald 3*5bc527feSMatthias Ringwaldproject(test-tlv-test) 4*5bc527feSMatthias Ringwald 5*5bc527feSMatthias Ringwaldset (BTSTACK_ROOT ${CMAKE_SOURCE_DIR}/../../) 6*5bc527feSMatthias Ringwald 7*5bc527feSMatthias Ringwald# add CppUTest 8*5bc527feSMatthias Ringwaldinclude_directories("/usr/local/include") 9*5bc527feSMatthias Ringwaldlink_directories("/usr/local/lib") 10*5bc527feSMatthias Ringwaldlink_libraries( CppUTest ) 11*5bc527feSMatthias Ringwaldlink_libraries( CppUTestExt ) 12*5bc527feSMatthias Ringwald 13*5bc527feSMatthias Ringwaldinclude_directories(../../3rd-party/micro-ecc) 14*5bc527feSMatthias Ringwaldinclude_directories(../../3rd-party/rijndael) 15*5bc527feSMatthias Ringwaldinclude_directories(../../platform/embedded) 16*5bc527feSMatthias Ringwaldinclude_directories(../../platform/posix) 17*5bc527feSMatthias Ringwaldinclude_directories(../../src) 18*5bc527feSMatthias Ringwaldinclude_directories(..) 19*5bc527feSMatthias Ringwald 20*5bc527feSMatthias Ringwald# test ENABLE_TLV_FLASH_WRITE_ONCE 21*5bc527feSMatthias Ringwaldadd_compile_definitions(ENABLE_TLV_FLASH_WRITE_ONCE) 22*5bc527feSMatthias Ringwald 23*5bc527feSMatthias Ringwald# Enable ASAN 24*5bc527feSMatthias Ringwaldadd_compile_options( -g -fsanitize=address) 25*5bc527feSMatthias Ringwaldadd_link_options( -fsanitize=address) 26*5bc527feSMatthias Ringwald 27*5bc527feSMatthias Ringwaldadd_executable(tlv_test 28*5bc527feSMatthias Ringwald tlv_test.cpp 29*5bc527feSMatthias Ringwald ${BTSTACK_ROOT}/src/btstack_util.c 30*5bc527feSMatthias Ringwald ${BTSTACK_ROOT}/src/hci_dump.c 31*5bc527feSMatthias Ringwald ${BTSTACK_ROOT}/src/classic/btstack_link_key_db_tlv.c 32*5bc527feSMatthias Ringwald ${BTSTACK_ROOT}/platform/embedded/btstack_tlv_flash_bank.c 33*5bc527feSMatthias Ringwald ${BTSTACK_ROOT}/platform/embedded/hal_flash_bank_memory.c 34*5bc527feSMatthias Ringwald ${BTSTACK_ROOT}/platform/posix/hci_dump_posix_fs.c 35*5bc527feSMatthias Ringwald) 36