CMakeLists.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright 2007 - 2021, Alan Antonuk and the rabbitmq-c contributors.
  2. # SPDX-License-Identifier: mit
  3. include_directories(
  4. ${LIBRABBITMQ_INCLUDE_DIRS}
  5. ${CMAKE_CURRENT_BINARY_DIR}/../librabbitmq/
  6. ${CMAKE_CURRENT_SOURCE_DIR}/../librabbitmq/)
  7. add_definitions(-DHAVE_CONFIG_H)
  8. add_definitions(-DAMQP_STATIC)
  9. add_executable(test_parse_url test_parse_url.c)
  10. target_link_libraries(test_parse_url rabbitmq-static)
  11. add_test(parse_url test_parse_url)
  12. add_executable(test_tables test_tables.c)
  13. target_link_libraries(test_tables rabbitmq-static)
  14. add_test(tables test_tables)
  15. configure_file(test_tables.expected ${CMAKE_CURRENT_BINARY_DIR}/tests/test_tables.expected COPYONLY)
  16. add_executable(test_status_enum
  17. test_status_enum.c)
  18. target_link_libraries(test_status_enum rabbitmq-static)
  19. add_test(status_enum test_status_enum)
  20. add_executable(test_basic
  21. test_basic.c)
  22. target_link_libraries(test_basic rabbitmq-static)
  23. if (RUN_SYSTEM_TESTS)
  24. if (NOT APPLE)
  25. add_test(basic test_basic)
  26. endif()
  27. endif(RUN_SYSTEM_TESTS)
  28. add_executable(test_sasl_mechanism test_sasl_mechanism.c)
  29. target_link_libraries(test_sasl_mechanism rabbitmq-static)
  30. add_test(sasl_mechanism test_sasl_mechanism)
  31. add_executable(test_merge_capabilities test_merge_capabilities.c)
  32. target_link_libraries(test_merge_capabilities rabbitmq-static)
  33. add_test(merge_capabilities test_merge_capabilities)