Skip to content

Commit a4057db

Browse files
committed
Replaced BOOST_DYN_LINK code with the same options that appear on the master branch (CPP-NETLIB_BUILD_SHARED_LIBS).
1 parent c5efecc commit a4057db

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

CMakeLists.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@
66
cmake_minimum_required(VERSION 2.8)
77
project(CPP-NETLIB)
88

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)
1312
message ("Linking boost testing libs dynamically...")
13+
set(Boost_USE_STATIC_LIBS OFF)
14+
set(CPP-NETLIB_BUILD_SHARED_LIBS ON)
1415
add_definitions(-DBOOST_TEST_DYN_LINK)
15-
elseif (BOOST_DYN_LINK)
16+
else()
1617
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()
1821

1922
set(Boost_USE_MULTI_THREADED ON)
2023
find_package( Boost 1.45.0 REQUIRED unit_test_framework system regex date_time thread filesystem program_options chrono )

libs/mime/test/CMakeLists.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ include_directories(${CPP-NETLIB_SOURCE_DIR})
22
find_package ( Boost 1.41.0 COMPONENTS unit_test_framework )
33
file ( COPY TestMessages DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
44

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()
1213
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()
1417

1518
set ( Boost_USE_MULTITHREADED ON )
1619

0 commit comments

Comments
 (0)