• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1include(FindCURL)
2if (NOT CURL_FOUND)
3  message(FATAL_ERROR "Cannot find libcurl library")
4endif ()
5
6link_libraries(ejdb2_s ${CUNIT_LIBRARIES} ${CURL_LIBRARIES})
7include_directories(${CUNIT_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/src/tests)
8
9set(TEST_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR})
10set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TEST_DATA_DIR})
11set(TESTS jbr_test1)
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