mirror of
https://github.com/bluekitchen/btstack.git
synced 2024-12-29 09:26:08 +00:00
41 lines
1.1 KiB
CMake
41 lines
1.1 KiB
CMake
cmake_minimum_required (VERSION 3.5)
|
|
|
|
project(test-tlv-test)
|
|
|
|
set (BTSTACK_ROOT ${CMAKE_SOURCE_DIR}/../../)
|
|
|
|
# pkgconfig required to link cpputest
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
# CppuTest
|
|
pkg_check_modules(CPPUTEST REQUIRED CppuTest)
|
|
include_directories(${CPPUTEST_INCLUDE_DIRS})
|
|
link_directories(${CPPUTEST_LIBRARY_DIRS})
|
|
link_libraries(${CPPUTEST_LIBRARIES})
|
|
|
|
include_directories(../../3rd-party/micro-ecc)
|
|
include_directories(../../3rd-party/rijndael)
|
|
include_directories(../../platform/embedded)
|
|
include_directories(../../platform/posix)
|
|
include_directories(../../src)
|
|
include_directories(.)
|
|
|
|
# Enable ASAN
|
|
add_compile_options( -g -fsanitize=address)
|
|
add_link_options( -fsanitize=address)
|
|
|
|
# create test targets
|
|
file(GLOB TARGETS_CPP "*_test.cpp")
|
|
# create targets
|
|
foreach(TARGET_FILE ${TARGETS_CPP})
|
|
get_filename_component(TEST ${TARGET_FILE} NAME_WE)
|
|
message("test/btstack_util: ${TEST}")
|
|
add_executable(${TEST}
|
|
${TARGET_FILE}
|
|
${BTSTACK_ROOT}/src/btstack_util.c
|
|
${BTSTACK_ROOT}/src/hci_dump.c
|
|
)
|
|
endforeach(TARGET_FILE)
|
|
|
|
|