Skip to content

Commit 7645557

Browse files
committed
Apparently the applink code has to be linked into the test app rather than the lib
1 parent 70fff06 commit 7645557

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: .github/workflows/test.yml

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
run: |
3434
mkdir build
3535
cd build
36-
dir ${{ env.OPENSSL_APPLINK_DIR }}
3736
cmake -G "NMake Makefiles" -DCASS_BUILD_UNIT_TESTS=On -DCASS_OPENSSL_APPLINK=${{ env.OPENSSL_APPLINK_DIR }}/applink.c ..
3837
nmake
3938
ls .

Diff for: src/CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ endif()
1313

1414
if(CASS_USE_OPENSSL)
1515
list(APPEND SOURCES ssl/ssl_openssl_impl.cpp ssl/ring_buffer_bio.cpp)
16-
# Allow user to specify the location of applink.c. Some Windows builds require this as an
17-
# interface into OpenSSL BIO ops. See https://docs.openssl.org/1.1.1/man3/OPENSSL_Applink/
18-
if(WIN32 AND (NOT CASS_OPENSSL_APPLINK STREQUAL ""))
19-
list(APPEND SOURCES "${CASS_OPENSSL_APPLINK}")
20-
endif()
2116
else()
2217
list(APPEND SOURCES ssl/ssl_no_impl.cpp)
2318
endif()

Diff for: tests/src/unit/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ source_group("Header Files" FILES ${UNIT_TESTS_INCLUDE_FILES})
2121
source_group("Source Files" FILES ${UNIT_TESTS_SOURCE_FILES})
2222
source_group("Source Files\\tests" FILES ${UNIT_TESTS_TESTS_SOURCE_FILES})
2323

24+
if(CASS_USE_OPENSSL AND WIN32 AND (NOT CASS_OPENSSL_APPLINK STREQUAL ""))
25+
# Allow user to specify the location of applink.c. Some Windows builds require this as an
26+
# interface into OpenSSL BIO ops. See https://docs.openssl.org/1.1.1/man3/OPENSSL_Applink/
27+
list(APPEND UNIT_TESTS_SOURCE_FILES "${CASS_OPENSSL_APPLINK}")
28+
endif()
29+
2430
add_executable(cassandra-unit-tests
2531
${MINIZIP_SOURCE_FILES}
2632
${UNIT_TESTS_SOURCE_FILES}

0 commit comments

Comments
 (0)