blob: 5e5303be1d86c545e512de49c52d812eee3fd5c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
macro(add_dlopen_lib NAME FUNCTION)
add_library(${NAME} SHARED Dynlib.cpp)
target_compile_definitions(${NAME} PRIVATE -DFUNCTION=${FUNCTION})
# LibLine is not special, just an "external" dependency
target_link_libraries(${NAME} LibLine)
# Avoid execution by the test runner
install(TARGETS ${NAME}
DESTINATION usr/Tests/LibELF
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
endmacro()
add_dlopen_lib(DynlibA dynliba_function)
add_dlopen_lib(DynlibB dynlibb_function)
set(TEST_SOURCES
test-elf.cpp
TestDlOpen.cpp
)
foreach(source IN LISTS TEST_SOURCES)
serenity_test("${source}" LibELF LIBS LibDl)
endforeach()
|