Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc31e693

Browse files
committed
Merge pull request#270 from tjadevries/0.9-devel
Support Boost dynamic linking tests.
2 parentsa5feaa6 +dd2d96c commitc31e693

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

‎CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,17 @@
55

66
cmake_minimum_required(VERSION2.8)
77
project(CPP-NETLIB)
8-
set(Boost_USE_STATIC_LIBSON)
8+
9+
option (BOOST_DYN_LINK
10+
"Build the project using dynamic linking for the boost testing libs"
11+
OFF)
12+
if (BOOST_DYN_LINK)
13+
message ("Linking boost testing libs dynamically...")
14+
add_definitions(-DBOOST_TEST_DYN_LINK)
15+
elseif (BOOST_DYN_LINK)
16+
set(Boost_USE_STATIC_LIBSON)
17+
endif(BOOST_DYN_LINK)
18+
919
set(Boost_USE_MULTI_THREADEDON)
1020
find_package(Boost1.45.0REQUIREDunit_test_frameworksystemregexdate_timethreadfilesystemprogram_optionschrono )
1121
find_package(OpenSSL )

‎libs/mime/test/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
include_directories(${CPP-NETLIB_SOURCE_DIR})
22
find_package (Boost1.41.0COMPONENTSunit_test_framework )
3-
set (Boost_USE_STATIC_LIBSON )
3+
4+
option (BOOST_DYN_LINK
5+
"Build the project using dynamic linking for the boost test libs"
6+
OFF)
7+
if (BOOST_DYN_LINK)
8+
message ("Do not try to link boost test libs dynamically for this test...")
9+
remove_definitions(-DBOOST_TEST_DYN_LINK)
10+
elseif (BOOST_DYN_LINK)
11+
set(Boost_USE_STATIC_LIBSON)
12+
endif(BOOST_DYN_LINK)
13+
414
set (Boost_USE_MULTITHREADEDON )
515

616
if (Boost_FOUND )

‎libs/network/test/http/server_async_run_stop_concurrency.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#defineBOOST_TEST_MODULE HTTP Asynchronous Server Tests
2+
#ifdef BOOST_TEST_DYN_LINK
3+
#defineBOOST_TEST_NO_MAIN
4+
#endif/* BOOST_TEST_DYN_LINK*/
25

36
#include<boost/network/include/http/server.hpp>
47
#include<boost/test/unit_test.hpp>
@@ -135,3 +138,6 @@ int main(int argc, char * argv[]) {
135138

136139
return0;
137140
}
141+
#ifdef BOOST_TEST_DYN_LINK
142+
#undef BOOST_TEST_NO_MAIN
143+
#endif/* BOOST_TEST_DYN_LINK*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp