1IF(GEOCOUCH_BUILD_FOR_UNIT_TESTS)
2  FILE(GLOB TEST_FILES *.t)
3  LIST(SORT TEST_FILES)
4
5  FOREACH (it ${TEST_FILES})
6    GET_FILENAME_COMPONENT(testname ${it} NAME_WE)
7    ADD_TEST(geocouch-gc-couchbase-${testname} ${PYTHON_EXECUTABLE}
8      ${COUCHDB_RUNTEST} -c ${COUCHSTORE_BIN_PATH} -p ${COUCHDB_BINARY_DIR}/src
9      -l ${PROJECT_BINARY_DIR} -m "couch_set_view/test"
10      -f "-pa ${CMAKE_CURRENT_BINARY_DIR}" -e ${ESCRIPT_EXECUTABLE}
11      -t ${it} --verbose)
12  ENDFOREACH (it)
13
14  FILE(GLOB VTREE_TEST_SRC *.erl)
15  ERL_BUILD(APPNAME "gc-couchbase_test" SOURCES ${VTREE_TEST_SRC})
16ENDIF(GEOCOUCH_BUILD_FOR_UNIT_TESTS)
17