feat: add CMake build configuration and unit tests for XRabbitMQClient
This commit is contained in:
19
test/CMakeLists.txt
Normal file
19
test/CMakeLists.txt
Normal 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)
|
||||
Reference in New Issue
Block a user