test/CMakeLists.txt

Sun, 07 Feb 2021 12:20:07 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 07 Feb 2021 12:20:07 +0100
changeset 391
f094a53c1178
parent 390
d345541018fa
child 395
dc1bfe5ffd38
permissions
-rw-r--r--

adds allocator interface and default implementation

     1 message(CHECK_START "Searching for CUnit test framework")
     3 find_path(CUNIT_INCLUDE_DIR NAMES CUnit/CUnit.h)
     4 find_library(CUNIT_LIBRARY NAMES cunit libcunit cunitlib)
     5 include(FindPackageHandleStandardArgs)
     6 find_package_handle_standard_args(CUnit DEFAULT_MSG CUNIT_LIBRARY CUNIT_INCLUDE_DIR)
     8 if(CUNIT_FOUND)
     9     message(CHECK_PASS "found: compiling tests.")
    10     set(TESTS
    11             test_allocator
    12             test_list
    13     )
    15     foreach(test ${TESTS})
    16         add_executable(${test} ${test}.c)
    17         target_link_libraries(${test} PRIVATE ucx_static ${CUNIT_LIBRARY})
    18         add_test(NAME ${test} COMMAND ${test} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
    19     endforeach()
    20 else()
    21     message(CHECK_FAIL "not found: unit tests will not be available.")
    22 endif()

mercurial