From 2a9ca24398529799eea8373056d7045da6c61d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Wed, 10 Jun 2026 16:22:52 +0200 Subject: [PATCH] tests: fix static link order Place the driver target before CASS_LIBS in target_link_libraries for integration tests. With static linking the linker resolves symbols left-to-right, so the archive providing symbols must precede the libraries that define them. ```sh cmake\ -DCASS_BUILD_INTEGRATION_TESTS=ON \ -DCASS_USE_STATIC_LIBS=ON \ -B build \ && (cd build && make) ``` now works. Before, it would fails with undefined references to OpenSSL symbols. Fixes: #164 Co-authored-by: Dmitry Kropachev --- tests/src/integration/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/integration/CMakeLists.txt b/tests/src/integration/CMakeLists.txt index dbfbcea8..83912afa 100644 --- a/tests/src/integration/CMakeLists.txt +++ b/tests/src/integration/CMakeLists.txt @@ -62,8 +62,8 @@ target_include_directories(cassandra-integration-tests PRIVATE ${CASS_INCLUDES}) target_link_libraries(cassandra-integration-tests - ${CASS_LIBS} ${PROJECT_LIB_NAME_TARGET} + ${CASS_LIBS} ${INTEGRATION_TESTS_LIBSSH2_LIBRARIES}) set_target_properties(cassandra-integration-tests PROPERTIES