1# SPDX-License-Identifier: Apache-2.0 2 3cmake_minimum_required(VERSION 3.20.0) 4 5project(bt_id_del) 6 7# Suppress the format-zero-length error if GNUC is used 8if (CMAKE_C_COMPILER_ID MATCHES "GNU") 9add_compile_options(-Wno-error=format-zero-length -Wno-format-zero-length) 10endif() 11 12find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) 13 14include_directories(BEFORE 15 ${ZEPHYR_BASE}/tests/bluetooth/host/id/mocks 16) 17 18add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host host_mocks) 19add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host/id/mocks mocks) 20 21target_link_libraries(testbinary PRIVATE mocks host_mocks) 22 23target_sources(testbinary 24 PRIVATE 25 src/main.c 26 src/test_suite_invalid_inputs.c 27 28 ${ZEPHYR_BASE}/subsys/bluetooth/host/id.c 29 ${ZEPHYR_BASE}/subsys/bluetooth/common/addr.c 30 ${ZEPHYR_BASE}/subsys/logging/log_minimal.c 31 ${ZEPHYR_BASE}/subsys/bluetooth/common/bt_str.c 32 ${ZEPHYR_BASE}/subsys/bluetooth/host/uuid.c 33) 34