Skip to content

Commit 55974d1

Browse files
committed
Fixing linker dependencies.
This is to support the additional requirement to link against libcrypto on an updated Ubuntu. This may be because of a change in the later version of libssl (OpenSSL).
1 parent a90e34b commit 55974d1

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

libs/network/test/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ if (Boost_FOUND)
1414
add_executable(cpp-netlib-message_transform_test message_transform_test.cpp)
1515
add_executable(cpp-netlib-url_test url_test.cpp)
1616
target_link_libraries(cpp-netlib-hello_world ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_THREAD_LIBRARY} pthread)
17-
target_link_libraries(cpp-netlib-http_1_0_test ${Boost_LIBRARIES} pthread ssl)
18-
target_link_libraries(cpp-netlib-http_1_1_test ${Boost_LIBRARIES} pthread ssl)
19-
target_link_libraries(cpp-netlib-http_message_test ${Boost_LIBRARIES} pthread ssl)
20-
target_link_libraries(cpp-netlib-message_test ${Boost_LIBRARIES} pthread ssl)
21-
target_link_libraries(cpp-netlib-message_transform_test ${Boost_LIBRARIES} pthread ssl)
22-
target_link_libraries(cpp-netlib-http_localhost_tests ${Boost_LIBRARIES} pthread ssl)
23-
target_link_libraries(cpp-netlib-https_localhost_tests ${Boost_LIBRARIES} pthread ssl)
24-
target_link_libraries(cpp-netlib-url_test ${Boost_LIBRARIES} pthread ssl)
17+
target_link_libraries(cpp-netlib-http_1_0_test ${Boost_LIBRARIES} pthread ssl crypto)
18+
target_link_libraries(cpp-netlib-http_1_1_test ${Boost_LIBRARIES} pthread ssl crypto)
19+
target_link_libraries(cpp-netlib-http_message_test ${Boost_LIBRARIES} pthread ssl crypto)
20+
target_link_libraries(cpp-netlib-message_test ${Boost_LIBRARIES} pthread ssl crypto)
21+
target_link_libraries(cpp-netlib-message_transform_test ${Boost_LIBRARIES} pthread ssl crypto)
22+
target_link_libraries(cpp-netlib-http_localhost_tests ${Boost_LIBRARIES} pthread ssl crypto)
23+
target_link_libraries(cpp-netlib-https_localhost_tests ${Boost_LIBRARIES} pthread ssl crypto)
24+
target_link_libraries(cpp-netlib-url_test ${Boost_LIBRARIES} pthread ssl crypto)
2525
set_target_properties(cpp-netlib-hello_world cpp-netlib-http_1_0_test cpp-netlib-http_1_1_test cpp-netlib-message_test cpp-netlib-http_message_test cpp-netlib-message_transform_test cpp-netlib-http_localhost_tests cpp-netlib-https_localhost_tests cpp-netlib-url_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../../../build/tests)
2626
add_test(cpp-netlib-hello_world python httplib_acceptance.py ../../../build/tests/cpp-netlib-hello_world ../../../build/tests/cpp-netlib-hello_world.passed)
2727
add_test(cpp-netlib-http_1_0_test ../../../build/tests/cpp-netlib-http_1_0_test)

libs/network/test/Jamfile.v2

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ project network_test :
2323
<source>/boost//filesystem
2424
<toolset>gcc:<linkflags>-lpthread
2525
<toolset>gcc:<linkflags>-lssl
26+
<toolset>gcc:<linkflags>-lcrypto
2627
<os>cygwin,<toolset>gcc:<define>_WIN32_WINNT=0x0501
2728
<os>cygwin,<toolset>gcc:<define>__USE_W32_SOCKETS
2829
<os>cygwin,<toolset>gcc:<library>ws2_32
@@ -35,21 +36,13 @@ project network_test :
3536
;
3637

3738
unit-test http_localhost_tests : http_localhost_tests.cpp ;
38-
3939
unit-test https_localhost_tests : https_localhost_tests.cpp ;
40-
4140
unit-test message_test : message_test.cpp ;
42-
4341
unit-test message_transform_test : message_transform_test.cpp ;
44-
4542
unit-test http_1_0_test : http_1_0_test.cpp ;
46-
4743
unit-test http_1_1_test : http_1_1_test.cpp ;
48-
4944
unit-test http_message_test : http_message_test.cpp ;
50-
5145
unit-test url_test : url_test.cpp ;
52-
5346
exe hello_world : hello_world.cpp ;
5447

5548
make httplib_acceptance.passed : httplib_acceptance.py hello_world : @python_runner ;

0 commit comments

Comments
 (0)