project(bin)


file(GLOB TESTFILES "${PROJECT_SOURCE_DIR}/*.cc" "${PROJECT_SOURCE_DIR}/*.c")
foreach(TS ${TESTFILES})
  get_filename_component(EXCNAME  ${TS}  NAME_WE)
  if(NOT WITH_REDIS)
    if( "${EXCNAME}" STREQUAL "test_redis")
    continue()
    endif()
  endif()
  add_executable( ${EXCNAME} ${TS} )
  target_link_libraries( ${EXCNAME} ${CPP_REDIS_LIBRARIES} pthread ${CMAKE_SOURCE_DIR}/extern/dim/linux/libdim.a earthworm)
endforeach(TS ${TESTFILES})
