1link_libraries(iowow_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 7foreach(TN IN ITEMS iwarr_test1 8 iwutils_test1 9 iwhmap_test1 10 ) 11 add_executable(${TN} ${TN}.c) 12 set_target_properties(${TN} PROPERTIES 13 COMPILE_FLAGS "-DIW_STATIC") 14 add_test(NAME ${TN} WORKING_DIRECTORY ${TEST_DATA_DIR} 15 COMMAND ${TEST_TOOL_CMD} $<TARGET_FILE:${TN}>) 16endforeach() 17