feat: add CMake build configuration and unit tests for XRabbitMQClient

This commit is contained in:
bing
2026-04-03 15:36:34 +08:00
parent b704b006c1
commit fee1555166
58 changed files with 6183 additions and 8 deletions

19
test/CMakeLists.txt Normal file
View File

@@ -0,0 +1,19 @@
find_package(xgoogletest CONFIG REQUIRED)
add_executable(xrabbitmqclient_test
test_rabbitmq_client.cpp
)
target_link_libraries(xrabbitmqclient_test PRIVATE
xrabbitmqclient
xgoogletest::xgoogletest
)
# Important for MSVC encoding issues
if(MSVC)
target_compile_options(xrabbitmqclient_test PRIVATE /utf-8)
endif()
# Register with CTest
include(GoogleTest)
gtest_discover_tests(xrabbitmqclient_test)