1 # Tests of the creaImageIO
3 SET(TEST_DRIVER "${KIT}Tests")
6 FILE(GLOB TEST_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "Test*.cpp" "Test*.cxx")
7 CREATE_TEST_SOURCELIST(TEST_SOURCELIST "${TEST_DRIVER}.cpp" ${TEST_FILES})
9 # Create test executables
10 ADD_EXECUTABLE(${TEST_DRIVER} ${TEST_SOURCELIST})
12 # Link dependent libraries
13 TARGET_LINK_LIBRARIES(${TEST_DRIVER} creaImageIO)
15 # Create list of tests for the ADD_TEST
16 SET(TESTS_TO_ADD ${TEST_SOURCELIST})
17 # Remove test driver from list
18 REMOVE(TESTS_TO_ADD "${TEST_DRIVER}.cpp")
19 # Add all the test executables
20 FOREACH(TEST ${TESTS_TO_ADD})
22 GET_FILENAME_COMPONENT(TEST_NAME ${TEST} NAME_WE)
24 ADD_TEST(${TEST_NAME} "${EXECUTABLE_OUTPUT_PATH}/${TEST_DRIVER}" ${TEST_NAME})
27 # location of the test data
28 ADD_DEFINITIONS(-DGIMMICK_TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data")