1link_libraries(ejdb2_s ${CUNIT_LIBRARIES}) 2include_directories(${CUNIT_INCLUDE_DIRS}) 3 4set(TEST_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}) 5set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TEST_DATA_DIR}) 6 7set(TESTS ejdb_test1 8 ejdb_test2 9 ejdb_test3 10 ejdb_test4 11 ) 12 13foreach (TN IN ITEMS ${TESTS}) 14 add_executable(${TN} ${TN}.c) 15 set_target_properties(${TN} PROPERTIES 16 COMPILE_FLAGS "-DIW_STATIC") 17 add_test(NAME ${TN} WORKING_DIRECTORY ${TEST_DATA_DIR} 18 COMMAND ${TEST_TOOL_CMD} $<TARGET_FILE:${TN}>) 19endforeach () 20