Files
wlan-cloud-lib-cppkafka/tests/CMakeLists.txt
Matias Fontanini a2d17a6f45 Test suite fixes (#124)
* Move polling strategy adapter definition into test_utils.cpp

* Use a random consumer group id in every test
2018-10-20 20:32:32 -07:00

30 lines
912 B
CMake

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include/)
include_directories(SYSTEM ${CATCH_INCLUDE})
include_directories(SYSTEM ${RDKAFKA_INCLUDE_DIR})
set(KAFKA_TEST_INSTANCE "kafka-vm:9092"
CACHE STRING "The kafka instance to which to connect to run tests")
add_custom_target(tests)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_definitions("-DKAFKA_TEST_INSTANCE=\"${KAFKA_TEST_INSTANCE}\"")
add_executable(cppkafka_tests
buffer_test.cpp
compacted_topic_processor_test.cpp
configuration_test.cpp
topic_partition_list_test.cpp
kafka_handle_base_test.cpp
producer_test.cpp
consumer_test.cpp
roundrobin_poll_test.cpp
headers_test.cpp
test_utils.cpp
# Main file
test_main.cpp
)
target_link_libraries(cppkafka_tests cppkafka ${RDKAFKA_LIBRARY} pthread rt ssl crypto dl z)
add_dependencies(tests cppkafka_tests)
add_test(cppkafka cppkafka_tests)