* Initial attempt at a Rust AMQP stack, merged against feature/rust_amqp for now. (#5942) * Enabled building AMQP *without* uAMQP * Start integrating Rust AMQP Value to C++ AMQP Value * AMQP Value tests now pass * Moved AmqpValueType ostream inserter to its original location * Added Rust AMQP Message implementation * Added start of message source tests * Enabled building AMQP *without* uAMQP * Start integrating Rust AMQP Value to C++ AMQP Value * Moved AmqpValueType ostream inserter to its original location * Message target support * Message source and target support * Add connection support; restructured tests to fail on RUST AMQP rather than attempting to run; removed some uAMQP-only features (#5986) * Checkpoint of connection logic * Started implementing Rust based Connection by pulling out uAMQP artifacts * Implemented AMQP Connection in Rust; started API surface refactoring for Rust APIs; Refactored tests to remove some uAMQP only elements. * Don't leak runtime context on calls * Refactor AMQP logic to better isolate rust AMQP code from uAMQP code. (#6008) * refactor uAMQP and Rust AMQP into separate implementations for ease of use * Add connection support; restructured tests to fail on RUST AMQP rather than attempting to run; removed some uAMQP-only features (#5986) * Checkpoint of connection logic * Started implementing Rust based Connection by pulling out uAMQP artifacts * Implemented AMQP Connection in Rust; started API surface refactoring for Rust APIs; Refactored tests to remove some uAMQP only elements. * Don't leak runtime context on calls * export UUID from AMQP * Cleaned up some more elements; reduced scope of doxygen significantly * runtime context needs to be process global not thread global; all tests pass or fail at this point * Merged main into branch * Implement AMQP Session APIs in Rust. (#6033) * Checkpoint of rust session support * Session begin/end now works * Session tests pass * Removed accidental regression * Added rust per-call context (#6043) * Reworked runtime context to be call context * Added context parameter to blocking AMQP calls * Added comments around the lifetime of the RustRuntimeContext captured in the CallContext object * uAMQP changes corresponding to Rust changes Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> * sync rust SDK fixes to C++ --------- Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> * Enable Rust ClaimsBasedSecurity interoperability; Converted EventHubs producer client to work with Rust AMQP changes. (#6059) * canonicalized return values; initial CBS support * Implementation of CBS for C++ * Amqp Authentication works; Integrate Rust AMQP into Eventhubs Producer client * Implemented Rust AMQP message sender. (#6083) * Initial sender implementation * PR feedback * Management APIs work (#6096) * Management APIs work --------- Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> * Converted builders to be compliant with Rust guidelines. (#6102) * Converted builders to be compliant with Rust guidelines. * Bring rust changes back to C++ repo * Improved builder developer experience * Removed builders from AMQP layer to conform to Rust guidelines; Fixed AMQP bug in message sender tests (#6208) * Removed builders from AMQP layer to conform to Rust guidelines; Fixed AMQP related bug in message sender tests * Pr feedback * Implement receiving messages; Changes to eventhubs so that all eventhubs tests pass (#6254) * Eventhubs tests pass * Noise reduction; explain the task which spawns a task * Update sdk/eventhubs/azure-messaging-eventhubs/src/producer_client.cpp Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> * PR feedback --------- Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> * Integrate Rust 2 step message receive code to C++ (#6349) * Integrate Rust 2 step message receive code to C++ * If receiving a delivery failed, transmit the error to the message channel if at all possible * Enable Rust based AMQP by default (#6362) * AMQP tests now pass; Integrate TestAmqpBroker with CI pipeline * Updated changelogs to reflect API changes made during AMQP updates * Replace uAMQP with Rust AMQP as the default AMQP transport; Updated build configurationj to reflect that * Test fixes * PR feedback; test fixes * Fixed uninitialized variable tanking some tests (#6381) * Fixed uninitialized variable tanking some tests * Fixed Rust AMQP tests * Removed connection string support from Eventhubs and EH tests. (#6391) * Removed the ability to use connection strings from EventHubs * Enable Rust AMQP by default!!! * Update CMakePresets.json Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> --------- Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
101 lines
3.0 KiB
CMake
101 lines
3.0 KiB
CMake
#
|
|
#
|
|
# Downloads GTest and provides a helper macro to add tests. Add make check, as well, which
|
|
# gives output on failed tests without having to set an environment variable.
|
|
#
|
|
# Modified version from https://github.com/CLIUtils/cmake/commit/4e52e4d0bc2e9fd27171926d0b5d9f396dd8637c
|
|
# License on Notice
|
|
#
|
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
|
|
|
if(CMAKE_VERSION VERSION_LESS 3.11)
|
|
set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED 1")
|
|
|
|
include(DownloadProject)
|
|
download_project(
|
|
PROJ googletest
|
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
|
GIT_TAG release-1.12.1
|
|
UPDATE_DISCONNECTED 1
|
|
QUIET
|
|
)
|
|
|
|
# CMake warning suppression will not be needed in version 1.9
|
|
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE BOOL "")
|
|
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_SOURCE_DIR} EXCLUDE_FROM_ALL)
|
|
unset(CMAKE_SUPPRESS_DEVELOPER_WARNINGS)
|
|
else()
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
googletest
|
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
|
GIT_TAG release-1.12.1
|
|
)
|
|
FetchContent_GetProperties(googletest)
|
|
if(NOT googletest_POPULATED)
|
|
FetchContent_MakeAvailable(googletest)
|
|
endif()
|
|
endif()
|
|
|
|
|
|
if(CMAKE_CONFIGURATION_TYPES)
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
|
|
--force-new-ctest-process --output-on-failure
|
|
--build-config "$<CONFIGURATION>")
|
|
else()
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
|
|
--force-new-ctest-process --output-on-failure)
|
|
endif()
|
|
set_target_properties(check PROPERTIES FOLDER "Scripts")
|
|
|
|
#include_directories(${gtest_SOURCE_DIR}/include)
|
|
|
|
# More modern way to do the last line, less messy but needs newish CMake:
|
|
#target_include_directories(gtest INTERFACE ${gtest_SOURCE_DIR}/include)
|
|
|
|
|
|
if(GOOGLE_TEST_INDIVIDUAL)
|
|
if(NOT CMAKE_VERSION VERSION_LESS 3.9)
|
|
include(GoogleTest)
|
|
else()
|
|
set(GOOGLE_TEST_INDIVIDUAL OFF)
|
|
endif()
|
|
endif()
|
|
|
|
# Target must already exist
|
|
macro(add_gtest TESTNAME)
|
|
target_link_libraries(${TESTNAME} PRIVATE gtest gmock gtest_main)
|
|
|
|
if(GOOGLE_TEST_INDIVIDUAL)
|
|
if(CMAKE_VERSION VERSION_LESS 3.10)
|
|
gtest_add_tests(TARGET ${TESTNAME}
|
|
TEST_PREFIX "${TESTNAME}."
|
|
TEST_LIST TmpTestList)
|
|
set_tests_properties(${TmpTestList} PROPERTIES FOLDER "Tests")
|
|
else()
|
|
gtest_discover_tests(${TESTNAME}
|
|
TEST_PREFIX "${TESTNAME}."
|
|
PROPERTIES FOLDER "Tests"
|
|
DISCOVERY_TIMEOUT 600)
|
|
endif()
|
|
else()
|
|
add_test(${TESTNAME} ${TESTNAME})
|
|
set_target_properties(${TESTNAME} PROPERTIES FOLDER "Tests")
|
|
endif()
|
|
|
|
endmacro()
|
|
|
|
mark_as_advanced(
|
|
gmock_build_tests
|
|
gtest_build_samples
|
|
gtest_build_tests
|
|
gtest_disable_pthreads
|
|
gtest_force_shared_crt
|
|
gtest_hide_internal_symbols
|
|
BUILD_GMOCK
|
|
BUILD_GTEST
|
|
)
|
|
|
|
set_target_properties(gtest gtest_main gmock gmock_main
|
|
PROPERTIES FOLDER "Extern")
|
|
|