Skip to content

Commit 3ccb0f9

Browse files
author
Michael Fero
committed
Updating minimum Boost version to 1.59.0 and other library versions
1 parent d42acb0 commit 3ccb0f9

File tree

5 files changed

+34
-79
lines changed

5 files changed

+34
-79
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ env:
1616
- BOOST_VERSION=1.59.0
1717
- BOOST_FILE_VERSION=1_59_0
1818
matrix:
19-
- LIBUV_VERSION=0.10.x EXACT_LIBUV_VERSION=0.10.36
20-
- LIBUV_VERSION=1.x EXACT_LIBUV_VERSION=1.7.5
19+
- LIBUV_VERSION=0.10.x EXACT_LIBUV_VERSION=0.10.37
20+
- LIBUV_VERSION=1.x EXACT_LIBUV_VERSION=1.8.0
2121
install:
2222
- if [ ! -d "${HOME}/dependencies/libuv-${LIBUV_VERSION}" ]; then
2323
wget -q http://dist.libuv.org/dist/v${EXACT_LIBUV_VERSION}/libuv-v${EXACT_LIBUV_VERSION}.tar.gz;
@@ -44,7 +44,7 @@ install:
4444
wget -q http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_FILE_VERSION}.tar.gz/download -O boost_${BOOST_FILE_VERSION}.tar.gz;
4545
tar xzf boost_${BOOST_FILE_VERSION}.tar.gz;
4646
cd boost_${BOOST_FILE_VERSION};
47-
./bootstrap.sh --with-libraries=atomic,chrono,date_time,log,program_options,random,system,thread,test --prefix=${HOME}/dependencies/boost_${BOOST_FILE_VERSION};
47+
./bootstrap.sh --with-libraries=atomic,chrono,system,thread,test --prefix=${HOME}/dependencies/boost_${BOOST_FILE_VERSION};
4848
./b2 -j2 install;
4949
cd - 2&> /dev/null;
5050
else echo "Using Cached Boost v${BOOST_VERSION}. Dependency does not need to be re-compiled";

cmake/modules/CppDriver.cmake

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ endmacro()
8888
#------------------------
8989

9090
# Minimum supported version of Boost
91-
set(CASS_MINIMUM_BOOST_VERSION 1.55.0)
91+
set(CASS_MINIMUM_BOOST_VERSION 1.59.0)
9292

9393
#------------------------
9494
# CassUseBoost
@@ -138,7 +138,14 @@ macro(CassUseBoost)
138138
if(CASS_BUILD_UNIT_TESTS OR CASS_BUILD_INTEGRATION_TESTS)
139139
find_package(Boost ${CASS_MINIMUM_BOOST_VERSION} COMPONENTS chrono system thread unit_test_framework)
140140
if(NOT Boost_FOUND)
141-
message(FATAL_ERROR "Boost [chrono, system, thread, and unit_test_framework] are required to build tests")
141+
# Ensure Boost was not found due to minimum version requirement
142+
set(CASS_FOUND_BOOST_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
143+
if((CASS_FOUND_BOOST_VERSION VERSION_GREATER "${CASS_MINIMUM_BOOST_VERSION}")
144+
OR (CASS_FOUND_BOOST_VERSION VERSION_EQUAL "${CASS_MINIMUM_BOOST_VERSION}"))
145+
message(FATAL_ERROR "Boost [chrono, system, thread, and unit_test_framework] are required to build tests")
146+
else()
147+
message(FATAL_ERROR "Boost v${CASS_FOUND_BOOST_VERSION} Found: v${CASS_MINIMUM_BOOST_VERSION} or greater required")
148+
endif()
142149
endif()
143150

144151
# Assign Boost include and libraries
@@ -147,15 +154,9 @@ macro(CassUseBoost)
147154
endif()
148155

149156
# Determine if additional Boost definitions are required for driver/executables
150-
set(CASS_FOUND_BOOST_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
151-
if((CASS_FOUND_BOOST_VERSION VERSION_GREATER "1.56.0") OR (CASS_FOUND_BOOST_VERSION VERSION_EQUAL "1.56.0"))
152-
if(NOT WIN32)
153-
# Handle explicit initialization warning in atomic/details/casts
154-
add_definitions(-Wno-missing-field-initializers)
155-
endif()
156-
else()
157-
# Handle redefinition warning of BOOST_NO_CXX11_RVALUE_REFERENCES
158-
add_definitions(-DBOOST_NO_CXX11_RVALUE_REFERENCES)
157+
if(NOT WIN32)
158+
# Handle explicit initialization warning in atomic/details/casts
159+
add_definitions(-Wno-missing-field-initializers)
159160
endif()
160161
endmacro()
161162

test/integration_tests/src/test_prepared.cpp

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -56,50 +56,6 @@ struct AllTypes {
5656
CassTime time_sample;
5757
};
5858

59-
// This crashes in Boost 1.57 and the test_utils::CassPreparedPtr version
60-
// doesn't compile against Boost 1.55 or 1.56
61-
62-
#if BOOST_VERSION < 105700
63-
// Move emulation wrapper for CassPrepared. This has to be used
64-
// with boost::container's because they have boost move emulation support.
65-
class CassPreparedMovable {
66-
public:
67-
CassPreparedMovable(const CassPrepared* prepared = NULL)
68-
: prepared_(prepared) {}
69-
70-
CassPreparedMovable(BOOST_RV_REF(CassPreparedMovable) r)
71-
: prepared_(r.prepared_) {
72-
r.prepared_ = NULL;
73-
}
74-
75-
CassPreparedMovable(const CassPreparedMovable& r)
76-
: prepared_(r.prepared_) {
77-
}
78-
79-
CassPreparedMovable& operator=(BOOST_RV_REF(CassPreparedMovable) r) {
80-
if (prepared_ != NULL) {
81-
cass_prepared_free(prepared_);
82-
}
83-
prepared_ = r.prepared_;
84-
r.prepared_ = NULL;
85-
return *this;
86-
}
87-
88-
~CassPreparedMovable() {
89-
if (prepared_ != NULL) {
90-
cass_prepared_free(prepared_);
91-
}
92-
}
93-
94-
const CassPrepared* get() const { return prepared_; }
95-
96-
private:
97-
BOOST_MOVABLE_BUT_NOT_COPYABLE(CassPreparedMovable)
98-
99-
const CassPrepared* prepared_;
100-
};
101-
#endif
102-
10359
struct PreparedTests : public test_utils::SingleSessionTest {
10460
static const char* ALL_TYPE_TABLE_NAME;
10561
std::string columns_;

topics/building/README.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies being installed.
2121

2222
### Test Dependencies
2323

24-
- [boost 1.55+](http://www.boost.org)
24+
- [boost 1.59+](http://www.boost.org)
2525
- [libssh2](http://www.libssh2.org) (optional)
2626

2727
## Linux/OS X
@@ -45,9 +45,9 @@ sudo yum -y install epel-release
4545
```bash
4646
sudo yum install automake cmake gcc-c++ git libtool openssl-devel wget
4747
pushd /tmp
48-
wget http://dist.libuv.org/dist/v1.7.5/libuv-v1.7.5.tar.gz
49-
tar xzf libuv-v1.7.5.tar.gz
50-
pushd libuv-v1.7.5
48+
wget http://dist.libuv.org/dist/v1.8.0/libuv-v1.8.0.tar.gz
49+
tar xzf libuv-v1.8.0.tar.gz
50+
pushd libuv-v1.8.0
5151
sh autogen.sh
5252
./configure
5353
sudo make install
@@ -114,7 +114,7 @@ make
114114
#### Obtaining Test Dependencies
115115

116116
##### CentOS/RHEL
117-
CentOS/RHEL does not contain Boost v1.55+ libraries in its repositories; however
117+
CentOS/RHEL does not contain Boost v1.59+ libraries in its repositories; however
118118
these can be easily installed from source. Ensure previous version of Boost has
119119
been removed by executing the command `sudo yum remove boost*` before
120120
proceeding.
@@ -125,7 +125,7 @@ pushd /tmp
125125
wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz/download -O boost_1_59_0.tar.gz
126126
tar xzf boost_1_59_0.tar.gz
127127
pushd boost_1_59_0
128-
./bootstrap.sh --with-libraries=atomic,chrono,date_time,log,program_options,random,regex,system,thread,test
128+
./bootstrap.sh --with-libraries=atomic,chrono,system,thread,test
129129
sudo ./b2 cxxflags="-fPIC" install
130130
popd
131131
popd
@@ -141,21 +141,19 @@ brew install boost libssh2
141141
```
142142

143143
##### Ubuntu
144-
145-
###### Additional Requirements for Ubuntu 12.04
146-
Ubuntu 12.04 does not contain Boost v1.55+ C++ libraries in its repositories;
147-
however it can be obtained from the Boost PPA which can be found
148-
[here](https://launchpad.net/~boost-latest/+archive/ubuntu/ppa).
149-
150-
```bash
151-
sudo add-apt-repository ppa:boost-latest/ppa
152-
sudo apt-get update
153-
```
154-
155-
##### Install Dependencies
144+
Ubuntu does not contain Boost v1.59+ libraries in its repositories; however
145+
these can be easily installed from source.
156146

157147
```bash
158-
sudo apt-get install libboost1.55-all-dev libssh2-1-dev
148+
sudo apt-get install libssh2-1-dev
149+
pushd /tmp
150+
wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz/download -O boost_1_59_0.tar.gz
151+
tar xzf boost_1_59_0.tar.gz
152+
pushd boost_1_59_0
153+
./bootstrap.sh --with-libraries=atomic,chrono,system,thread,test
154+
sudo ./b2 install
155+
popd
156+
popd
159157
```
160158

161159
#### Building the Driver with the Tests
@@ -294,7 +292,7 @@ driver dependencies will also be copied (e.g. C:\myproject\dependencies\libs)
294292
### Test Dependencies and Building the Tests (_NOT REQUIRED_)
295293

296294
#### Obtaining Test Dependencies
297-
Boost v1.55+ is the only external dependency that will need to be obtained in
295+
Boost v1.59+ is the only external dependency that will need to be obtained in
298296
order to build the unit and integration tests.
299297

300298
To simplify the process; pre-built binaries can be obtained

vc_build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ SET LIBSSH2_BRANCH_TAG_VERSION=libssh2-1.7.0
118118
SET LIBSSH2_PACKAGE_VERSION=1.7.0
119119
SET OPENSSL_REPOSITORY_URL=https://github.com/openssl/openssl.git
120120
SET OPENSSL_DIRECTORY=openssl
121-
SET OPENSSL_BRANCH_TAG_VERSION=OpenSSL_1_0_2h
121+
SET OPENSSL_BRANCH_TAG_VERSION=OpenSSL_1_0_2j
122122
SET OPENSSL_PACKAGE_VERSION=1.0.2h
123123
SET ZLIB_REPOSITORY_URL=https://github.com/madler/zlib.git
124124
SET ZLIB_DIRECTORY=zlib

0 commit comments

Comments
 (0)