File tree Expand file tree Collapse file tree 2 files changed +20
-14
lines changed Expand file tree Collapse file tree 2 files changed +20
-14
lines changed Original file line number Diff line number Diff line change 6
6
cmake_minimum_required (VERSION 2.8 )
7
7
project (CPP-NETLIB )
8
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 )
9
+ option ( CPP-NETLIB_BUILD_SHARED_LIBS "Build cpp-netlib as shared libraries." OFF )
10
+
11
+ if (CPP-NETLIB_BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS )
13
12
message ("Linking boost testing libs dynamically..." )
13
+ set (Boost_USE_STATIC_LIBS OFF )
14
+ set (CPP-NETLIB_BUILD_SHARED_LIBS ON )
14
15
add_definitions (-DBOOST_TEST_DYN_LINK )
15
- elseif ( BOOST_DYN_LINK )
16
+ else ( )
16
17
set (Boost_USE_STATIC_LIBS ON )
17
- endif (BOOST_DYN_LINK )
18
+ set (CPP-NETLIB_BUILD_SHARED_LIBS OFF )
19
+ set (BUILD_SHARED_LIBS OFF )
20
+ endif ()
18
21
19
22
set (Boost_USE_MULTI_THREADED ON )
20
23
find_package ( Boost 1.45.0 REQUIRED unit_test_framework system regex date_time thread filesystem program_options chrono )
Original file line number Diff line number Diff line change @@ -2,15 +2,18 @@ include_directories(${CPP-NETLIB_SOURCE_DIR})
2
2
find_package ( Boost 1.41.0 COMPONENTS unit_test_framework )
3
3
file ( COPY TestMessages DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
4
4
5
- option (BOOST_DYN_LINK
6
- "Build the project using dynamic linking for the boost test libs"
7
- OFF )
8
- if (BOOST_DYN_LINK )
9
- message ("Do not try to link boost test libs dynamically for this test..." )
10
- remove_definitions (-DBOOST_TEST_DYN_LINK )
11
- elseif (BOOST_DYN_LINK )
5
+ option ( CPP-NETLIB_BUILD_SHARED_LIBS "Build cpp-netlib as shared libraries." OFF )
6
+
7
+ if (CPP-NETLIB_BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS )
8
+ message ("Linking boost testing libs dynamically..." )
9
+ set (Boost_USE_STATIC_LIBS OFF )
10
+ set (CPP-NETLIB_BUILD_SHARED_LIBS ON )
11
+ add_definitions (-DBOOST_TEST_DYN_LINK )
12
+ else ()
12
13
set (Boost_USE_STATIC_LIBS ON )
13
- endif (BOOST_DYN_LINK )
14
+ set (CPP-NETLIB_BUILD_SHARED_LIBS OFF )
15
+ set (BUILD_SHARED_LIBS OFF )
16
+ endif ()
14
17
15
18
set ( Boost_USE_MULTITHREADED ON )
16
19
You can’t perform that action at this time.
0 commit comments