mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-29 15:34:08 +02:00
Merge pull request #662 from redboltz/update_boost_on_travis
Update boost on travis
This commit is contained in:
commit
280abe852c
@ -28,7 +28,7 @@ install:
|
||||
# valgrind
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget http://valgrind.org/downloads/valgrind-3.12.0.tar.bz2 && tar xjf valgrind-3.12.0.tar.bz2 && cd valgrind-3.12.0 && ./configure --prefix=${BASE}/usr > /dev/null && make -j3 > /dev/null && make install > /dev/null && cd ..; fi
|
||||
# boost
|
||||
- if [ "$BOOST" == "ON" ]; then wget http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.zip && unzip -q boost_1_63_0.zip && cd boost_1_63_0 && ./bootstrap.sh && ./b2 -j3 --prefix=${BASE}/usr --with-chrono --with-context --with-system --with-timer address-model=${ARCH} install > /dev/null && cd ..; fi
|
||||
- if [ "$BOOST" == "ON" ]; then wget http://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.zip && unzip -q boost_1_66_0.zip && cd boost_1_66_0 && ./bootstrap.sh && ./b2 -j3 --prefix=${BASE}/usr --with-chrono --with-context --with-system --with-timer address-model=${ARCH} install > /dev/null && cd ..; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/include; fi
|
||||
|
||||
matrix:
|
||||
|
@ -70,13 +70,22 @@ int main() {
|
||||
// Client
|
||||
auto host = "localhost";
|
||||
boost::asio::ip::tcp::resolver r(ios);
|
||||
|
||||
#if BOOST_VERSION < 106600
|
||||
boost::asio::ip::tcp::resolver::query q(host, boost::lexical_cast<std::string>(port));
|
||||
auto it = r.resolve(q);
|
||||
boost::asio::ip::tcp::resolver::iterator end;
|
||||
#else // BOOST_VERSION < 106600
|
||||
auto eps = r.resolve(host, boost::lexical_cast<std::string>(port));
|
||||
auto it = eps.begin();
|
||||
auto end = eps.end();
|
||||
#endif // BOOST_VERSION < 106600
|
||||
|
||||
boost::asio::ip::tcp::socket cs(ios);
|
||||
boost::asio::async_connect(
|
||||
cs,
|
||||
|
||||
it,
|
||||
end,
|
||||
[&]
|
||||
(boost::system::error_code const& e, boost::asio::ip::tcp::resolver::iterator) {
|
||||
if (e) {
|
||||
|
@ -136,13 +136,24 @@ int main() {
|
||||
|
||||
// Client
|
||||
auto host = "localhost";
|
||||
|
||||
boost::asio::ip::tcp::resolver r(ios);
|
||||
|
||||
#if BOOST_VERSION < 106600
|
||||
boost::asio::ip::tcp::resolver::query q(host, boost::lexical_cast<std::string>(port));
|
||||
auto it = r.resolve(q);
|
||||
boost::asio::ip::tcp::resolver::iterator end;
|
||||
#else // BOOST_VERSION < 106600
|
||||
auto eps = r.resolve(host, boost::lexical_cast<std::string>(port));
|
||||
auto it = eps.begin();
|
||||
auto end = eps.end();
|
||||
#endif // BOOST_VERSION < 106600
|
||||
|
||||
boost::asio::ip::tcp::socket cs(ios);
|
||||
boost::asio::async_connect(
|
||||
cs,
|
||||
it,
|
||||
end,
|
||||
[&]
|
||||
(boost::system::error_code const& e, boost::asio::ip::tcp::resolver::iterator) {
|
||||
if (e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user