-
Notifications
You must be signed in to change notification settings - Fork 219
/
CMakeLists.txt
63 lines (54 loc) · 1.37 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# CMake snippet for building the shared OSAL layer coverage tests
# A list of modules in the shared OSAL implementation.
# Each entry corresponds to a source file name osapi-${MODULE}.c
set(MODULE_LIST
binsem
clock
common
countsem
dir
errors
file
filesys
heap
idmap
module
mutex
network
printf
queue
select
sockets
task
timebase
time
version
)
set(SHARED_COVERAGE_LINK_LIST
os-shared-coverage-support
ut-adaptor-shared
ut_osapi_impl_stubs
ut_osapi_init_stubs
ut_osapi_shared_stubs
ut_osapi_table_stubs
ut_osapi_stubs
ut_libc_stubs
)
add_library(os-shared-coverage-support STATIC
src/os-shared-coverage-support.c
)
add_subdirectory(adaptors)
# Add all coverage tests in the src dir
foreach(MODNAME ${MODULE_LIST})
add_coverage_testrunner(
"coverage-${SETNAME}-${MODNAME}"
"${OSAL_SOURCE_DIR}/src/os/${SETNAME}/src/osapi-${MODNAME}.c"
"${CMAKE_CURRENT_SOURCE_DIR}/src/coveragetest-${MODNAME}.c"
${SHARED_COVERAGE_LINK_LIST}
)
endforeach(MODNAME ${MODULE_LIST})
# Add extra defintion to force the OS_STATIC_SYMTABLE_SOURCE to the
# local value within the module coverage test
target_compile_definitions(utobj_coverage-shared-module PRIVATE
"OS_STATIC_SYMTABLE_SOURCE=OS_UT_STATIC_SYMBOL_TABLE"
)