summaryrefslogtreecommitdiff
path: root/Tests/LibC/CMakeLists.txt
blob: 0e1bf952c5d9eb7e337d6b24876a88f092cc463f (plain)
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
set(TEST_SOURCES
    ${CMAKE_CURRENT_SOURCE_DIR}/snprintf-correctness.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/strlcpy-correctness.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/TestLibCTime.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/TestLibCMkTemp.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/TestLibCExec.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/TestLibCDirEnt.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/TestLibCInodeWatcher.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/TestLibCString.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/TestStackSmash.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/TestIo.cpp
)

file(GLOB CMD_SOURCES  CONFIGURE_DEPENDS "*.cpp")
list(REMOVE_ITEM CMD_SOURCES ${TEST_SOURCES})

# FIXME: These tests do not use LibTest
foreach(CMD_SRC ${CMD_SOURCES})
    get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE)
    add_executable(${CMD_NAME} ${CMD_SRC})
    target_link_libraries(${CMD_NAME} LibCore)
    install(TARGETS ${CMD_NAME} RUNTIME DESTINATION usr/Tests/LibC)
endforeach()

foreach(source ${TEST_SOURCES})
    serenity_test(${source} LibC)
endforeach()