test/CMakeLists.txt

changeset 395
dc1bfe5ffd38
parent 391
f094a53c1178
child 398
8d506ed6c1c0
equal deleted inserted replaced
394:80c31ebd66c1 395:dc1bfe5ffd38
13 ) 13 )
14 14
15 foreach(test ${TESTS}) 15 foreach(test ${TESTS})
16 add_executable(${test} ${test}.c) 16 add_executable(${test} ${test}.c)
17 target_link_libraries(${test} PRIVATE ucx_static ${CUNIT_LIBRARY}) 17 target_link_libraries(${test} PRIVATE ucx_static ${CUNIT_LIBRARY})
18 target_include_directories(${test} PRIVATE ${CUNIT_INCLUDE_DIR})
18 add_test(NAME ${test} COMMAND ${test} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") 19 add_test(NAME ${test} COMMAND ${test} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
19 endforeach() 20 endforeach()
20 else() 21 else()
21 message(CHECK_FAIL "not found: unit tests will not be available.") 22 message(CHECK_FAIL "not found: unit tests will not be available.")
22 endif() 23 endif()

mercurial