From e80404ec3222b0bd516ea4ad475c66c7222a4350 Mon Sep 17 00:00:00 2001 From: Igor Peshansky Date: Tue, 6 Mar 2018 14:28:24 -0500 Subject: [PATCH 01/28] Updated uri submodule to pick up GCC 6+ fixes. --- deps/uri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/uri b/deps/uri index c16a46ecb..f732ef834 160000 --- a/deps/uri +++ b/deps/uri @@ -1 +1 @@ -Subproject commit c16a46ecb6bf0c936179e324891a74b5e6d8f4d3 +Subproject commit f732ef834b6f9bc65802b8b5ac7ec9d5892c1853 From 540ed7622be3f9534709036522f86bde1e84829f Mon Sep 17 00:00:00 2001 From: Igor Peshansky Date: Thu, 15 Mar 2018 14:12:32 -0400 Subject: [PATCH 02/28] Enable remove_chunk_markers by default. Fix a bug and add a comment. --- boost/network/protocol/http/client/options.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boost/network/protocol/http/client/options.hpp b/boost/network/protocol/http/client/options.hpp index e73567099..bcc266789 100644 --- a/boost/network/protocol/http/client/options.hpp +++ b/boost/network/protocol/http/client/options.hpp @@ -35,7 +35,7 @@ class client_options { io_service_(), always_verify_peer_(true), timeout_(0), - remove_chunk_markers_(false) {} + remove_chunk_markers_(true) {} client_options(client_options const& other) : cache_resolved_(other.cache_resolved_), @@ -50,7 +50,7 @@ class client_options { io_service_(other.io_service_), always_verify_peer_(other.always_verify_peer_), timeout_(other.timeout_), - remove_chunk_markers_(other.remove_chunk_markers) {} + remove_chunk_markers_(other.remove_chunk_markers_) {} client_options& operator=(client_options other) { other.swap(*this); @@ -157,7 +157,7 @@ class client_options { return *this; } - /// Set an overall timeout for HTTP requests. + /// Set whether we process chunked-encoded streams. client_options& remove_chunk_markers(bool v) { remove_chunk_markers_ = v; return *this; From b9a864e160a604def450ecfb28c2c8c454f39db2 Mon Sep 17 00:00:00 2001 From: David VandeBunte Date: Mon, 4 Jun 2018 19:44:39 -0500 Subject: [PATCH 03/28] bugfix: libs: Update 'breathe' submodule pointer (#846) This project recently had its history rewritten, and the SHA we referred to no longer exists. See discussion here: https://github.com/cpp-netlib/cpp-netlib/pull/582 --- libs/network/doc/_ext/breathe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/network/doc/_ext/breathe b/libs/network/doc/_ext/breathe index 853385ef4..a564b991b 160000 --- a/libs/network/doc/_ext/breathe +++ b/libs/network/doc/_ext/breathe @@ -1 +1 @@ -Subproject commit 853385ef4f0c3dd126887750e20d5f7456065998 +Subproject commit a564b991b5eb2dc220ca29ef21b9c68bdc2f8ac6 From 604d61146d844131964c1181b7c122e25ae8f7c1 Mon Sep 17 00:00:00 2001 From: Hugo Maingonnat Date: Tue, 12 Jun 2018 01:50:41 +0200 Subject: [PATCH 04/28] cherry-pick: updating breathe because their history has been rewritten (#847) --- libs/network/doc/_ext/breathe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/network/doc/_ext/breathe b/libs/network/doc/_ext/breathe index a564b991b..65440b267 160000 --- a/libs/network/doc/_ext/breathe +++ b/libs/network/doc/_ext/breathe @@ -1 +1 @@ -Subproject commit a564b991b5eb2dc220ca29ef21b9c68bdc2f8ac6 +Subproject commit 65440b2673ebcc5c6ee2792b0b25754effba1183 From ed6ff63a24df3fe9d7f9eda21dc2b0f6295ab5c7 Mon Sep 17 00:00:00 2001 From: Yuval Hager Date: Thu, 17 May 2018 09:25:18 -0700 Subject: [PATCH 05/28] fix client_get_streaming_test (#840) * fix client_get_streaming_test * perform client_get_streaming_test only if SSL is enabled * test for BOOST_NETWORK_ENABLE_HTTPS for https streaming test --- libs/network/test/http/client_get_streaming_test.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/network/test/http/client_get_streaming_test.cpp b/libs/network/test/http/client_get_streaming_test.cpp index ae08f26e0..f08d24a6a 100644 --- a/libs/network/test/http/client_get_streaming_test.cpp +++ b/libs/network/test/http/client_get_streaming_test.cpp @@ -25,8 +25,9 @@ struct body_handler { TYPED_TEST_CASE(HTTPClientTest, ClientTypes); +#ifdef BOOST_NETWORK_ENABLE_HTTPS TYPED_TEST(HTTPClientTest, GetStreamingTest) { - typename TypeParam::request request("http://www.boost.org/"); + typename TypeParam::request request("https://www.boost.org/"); typename TypeParam::response response; typename TypeParam::string_type body_string; typename TypeParam::string_type dummy_body; @@ -47,3 +48,4 @@ TYPED_TEST(HTTPClientTest, GetStreamingTest) { } EXPECT_EQ(dummy_body, typename TypeParam::string_type()); } +#endif From b9a53771ea0ca51f9b71e5b36153edc7ec9a6952 Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Tue, 19 Jun 2018 13:36:39 +1000 Subject: [PATCH 06/28] Update submodule for URI to use C++11 features --- deps/uri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/uri b/deps/uri index f732ef834..ae076acc0 160000 --- a/deps/uri +++ b/deps/uri @@ -1 +1 @@ -Subproject commit f732ef834b6f9bc65802b8b5ac7ec9d5892c1853 +Subproject commit ae076acc01b2a0c2f973aadbe9a5e4b080fdc88c From b284b144c334437dc14eef8959fe826c2b8a4482 Mon Sep 17 00:00:00 2001 From: oneiric <33737923+coneiric@users.noreply.github.com> Date: Thu, 21 Jun 2018 23:46:01 +0000 Subject: [PATCH 07/28] Directives: remove parens to silence gcc8 warning (#844) --- boost/network/message/directives/detail/string_directive.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boost/network/message/directives/detail/string_directive.hpp b/boost/network/message/directives/detail/string_directive.hpp index db07eceb4..3c1e652db 100644 --- a/boost/network/message/directives/detail/string_directive.hpp +++ b/boost/network/message/directives/detail/string_directive.hpp @@ -34,8 +34,8 @@ #define BOOST_NETWORK_STRING_DIRECTIVE(name, value, body, pod_body) \ template \ struct name##_directive { \ - ValueType const&((value)); \ - explicit name##_directive(ValueType const& value_) : value(value_) {} \ + ValueType const& value; \ + explicit name##_directive(ValueType const& v) : value(v) {} \ name##_directive(name##_directive const& other) : value(other.value) {} \ template class Message> \ typename enable_if, void>::type operator()( \ From e09e7abfc06b7af709418d34f65697b918a198d9 Mon Sep 17 00:00:00 2001 From: mtrenkmann Date: Fri, 2 Nov 2018 06:54:08 +0100 Subject: [PATCH 08/28] Add echo_async_server example (#862) --- .../example/http/echo_async_server.cpp | 242 ++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 libs/network/example/http/echo_async_server.cpp diff --git a/libs/network/example/http/echo_async_server.cpp b/libs/network/example/http/echo_async_server.cpp new file mode 100644 index 000000000..56aeb4e23 --- /dev/null +++ b/libs/network/example/http/echo_async_server.cpp @@ -0,0 +1,242 @@ +// Copyright 2018 Martin Trenkmann +// Based on cpp-netlib/libs/network/example/http/fileserver.cpp +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// This example implements a minimal echo server that receives plain text via +// POST requests and sends the same text back to the client (with an additional +// newline appended for nicer output). Since the server uses asynchronous I/O, +// the body data is not available through request.body, but must be read using +// connection->read(callback). +// +// This code is minimal, it does not... +// - handle any kinds of errors, +// - look at the URI path (request.destination), +// - handle request methods other than POST (request.method), +// - check for too large bodies (which make the server vulnerable to attacks), +// - model state, e.g. database connections (this type of context should be +// injected into the post_request_handler constructor). +// +// About handling large body data: +// According to https://tools.ietf.org/html/rfc2616#section-8.2.3, HTTP clients +// may send a "Expect: 100-continue" header before sending large body data in +// order to negotiate whether the server is willing to accept the data. If the +// server agrees, it should send an interim response with a "100 Continue" +// status code. The client then should start sending the data and upon +// completion, the server should send a final response including a status code +// and possibly headers and body data. +// +// About cpp-netlib 0.13 and the "Expect: 100-continue" header: +// When a client sends a POST request with a "Expect: 100-continue" header, the +// callback passed into connection->read() gets triggered with an empty chunk of +// data. As described before, the server should then send an "100 Continue" +// interim response, but this seems to be not supported by the library at the +// moment, because trying to set and send a status code on the connection object +// more than once throws an exception. However, since clients are allowed to +// send data even though they never received a "100 Continue", the server should +// continue reading data from the connection, by calling connection->read() +// again, until the expected number of bytes, based on the "Content-Length" +// header, has been received. +// +// About curl and the "Expect: 100-continue" header: +// According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect +// no common browsers make use of the "Expect" header, but some other clients +// such as curl do so by default. In fact, curl sends a "Expect: 100-continue" +// header with POST requests that contain at least 1KiB of data (see example +// session below). Fortunately, curl also starts sending the data if it does +// not receive a "100 Continue" status code after a timeout of 1 second, which +// makes it "compatible" with servers that cannot send interim responses such as +// cpp-netlib 0.13. +// +// The timeout in curl is configurable via "--expect100-timeout " +// command line argument. The minimum value seems to be 1 second. +// +// Example session: +// Two POST requests are sent to the echo server using curl. The first one with +// data less than 1KiB, the second one with data more than 1KiB which shows the +// use of the "Expect: 100-continue" header. +// +// The "lorem" command generates lorem ipsum text. It can be installed via +// "sudo apt-get install libtext-lorem-perl" on Debian-based systems. +// +// 1. Sending less than 1KiB +// ------------------------- +// +// $ curl -v -H 'Content-Type: text/plain' -d "$(lorem -s 3 | fold)" http://localhost:8000 +// * Rebuilt URL to: http://localhost:8000/ +// * Trying 127.0.0.1... +// * Connected to localhost (127.0.0.1) port 8000 (#0) +// > POST / HTTP/1.1 +// > Host: localhost:8000 +// > User-Agent: curl/7.47.0 +// > Accept: */* +// > Content-Type: text/plain +// > Content-Length: 155 +// > +// * upload completely sent off: 155 out of 155 bytes +// < HTTP/1.1 200 OK +// < Content-Type: text/plain +// < Content-Length: 156 +// < +// Iusto autem omnis necessitatibus quia omnis nemo sequi. Occaecati est explicabo +// qui placeat ipsa debitis fugit sit. Quasi sequi in est eius qui molestiae. +// * Connection #0 to host localhost left intact +// +// SERVER OUTPUT +// +// Host: localhost:8000 +// User-Agent: curl/7.47.0 +// Accept: */* +// Content-Type: text/plain +// Content-Length: 155 +// Chunk size: 155 +// +// 2. Sending more than 1KiB +// ------------------------- +// +// $ curl -v -H 'Content-Type: text/plain' -d "$(lorem -s 30 | fold)" http://localhost:8000 +// * Rebuilt URL to: http://localhost:8000/ +// * Trying 127.0.0.1... +// * Connected to localhost (127.0.0.1) port 8000 (#0) +// > POST / HTTP/1.1 +// > Host: localhost:8000 +// > User-Agent: curl/7.47.0 +// > Accept: */* +// > Content-Type: text/plain +// > Content-Length: 1324 +// > Expect: 100-continue +// > +// * Done waiting for 100-continue +// * We are completely uploaded and fine +// < HTTP/1.1 200 OK +// < Content-Type: text/plain +// < Content-Length: 1325 +// < +// Fugit quo aliquid in et consectetur sed id. Aliquam dolor optio labore sit autem +// . Culpa at omnis et consectetur minima nostrum sed. Veniam similique dolorum des +// erunt aut et et aut quo. Laudantium nesciunt est repellat. Dolores adipisci alia +// s dicta dicta. Impedit porro pariatur quisquam sit ex ducimus a. Consequatur ius +// to possimus in sint nesciunt molestiae fugiat et. Est praesentium quos quam libe +// ro vel nostrum placeat consequuntur. Tempora nihil aut aliquam. Atque ab sunt ut +// sed quo ut. Quia qui omnis non. In laboriosam possimus laboriosam consequatur v +// el dolores. Reprehenderit totam quis dolore debitis ullam. Aut iure omnis invent +// ore quaerat aut veniam vel magni. Temporibus voluptatibus accusamus qui facilis +// at aut. Voluptatem provident incidunt officia. Quos quo autem quae illo. Modi am +// et quis eveniet. Nemo tenetur quia unde. Velit molestiae laborum eum. Repellat m +// olestias eos eos accusantium dolorem molestias pariatur ex. Nihil dolorum possim +// us ut ut beatae. Quia nam sit aut voluptatum maiores quibusdam id aliquid. Nulla +// numquam rem quo doloremque ut ut. Aspernatur accusamus illo illo dolores repudi +// andae dicta reiciendis. Quis laborum magni et incidunt nihil. Ea quia consequunt +// ur quos minima aut veniam ratione sed. Ea deleniti accusamus est quo nisi. Quia +// quibusdam et aut reiciendis. +// * Connection #0 to host localhost left intact +// +// SERVER OUTPUT +// +// Host: localhost:8000 +// User-Agent: curl/7.47.0 +// Accept: */* +// Content-Type: text/plain +// Content-Length: 1324 +// Expect: 100-continue +// Chunk size: 0 +// Chunk size: 1024 +// Chunk size: 300 + +#include +#include +#include +#include +#include +#include + +namespace http = boost::network::http; + +struct request_handler; +using echo_server = http::server; + +struct post_request_handler + : public std::enable_shared_from_this { + explicit post_request_handler(const echo_server::request& request) + : content_length_(0) { + for (const auto& header : request.headers) { + std::cout << header.name << ": " << header.value << '\n'; + if (boost::iequals(header.name, "content-length")) { + content_length_ = std::stoul(header.value); + } + } + } + + void operator()(echo_server::connection::input_range chunk, + boost::system::error_code ec, size_t chunk_size, + echo_server::connection_ptr connection) { + assert(chunk.size() == chunk_size); + std::cout << "Chunk size: " << chunk_size << '\n'; + + if (ec) { + std::cerr << "Error code: " << ec << '\n'; + return; + } + + body_.append(chunk.begin(), chunk.end()); + if (body_.size() < content_length_) { + auto self = this->shared_from_this(); + connection->read([self](echo_server::connection::input_range chunk, + boost::system::error_code ec, size_t chunk_size, + echo_server::connection_ptr connection) { + (*self)(chunk, ec, chunk_size, connection); + }); + return; + } + + body_.push_back('\n'); + std::vector headers; + headers.push_back({"Content-Type", "text/plain"}); + headers.push_back({"Content-Length", std::to_string(body_.size())}); + connection->set_status(echo_server::connection::ok); + connection->set_headers(headers); + connection->write(body_); + } + + private: + size_t content_length_; + std::string body_; +}; + +struct request_handler { + void operator()(const echo_server::request& request, + echo_server::connection_ptr connection) { + if (request.method == "POST") { + auto h = std::make_shared(request); + connection->read([h](echo_server::connection::input_range chunk, + boost::system::error_code ec, size_t chunk_size, + echo_server::connection_ptr connection) { + (*h)(chunk, ec, chunk_size, connection); + }); + } + } +}; + +int main() { + try { + request_handler handler; + auto io_service = std::make_shared(); + echo_server server( + echo_server::options(handler).io_service(io_service).port("8000")); + server.run(); + + // Clean shutdown when pressing Ctrl+C. + boost::asio::signal_set signals(*io_service, SIGINT, SIGTERM); + signals.async_wait([&server](const boost::system::error_code& ec, + int /* signal_number */) { + if (!ec) { + server.stop(); + } + }); + return EXIT_SUCCESS; + } catch (const std::exception& error) { + std::cerr << error.what() << std::endl; + return EXIT_FAILURE; + } +} From 8cafe882325a1a56d6833a171f6ca7371c5a95e5 Mon Sep 17 00:00:00 2001 From: mtrenkmann Date: Mon, 26 Nov 2018 01:24:37 +0100 Subject: [PATCH 09/28] Start server after register signal handler (#864) --- libs/network/example/http/echo_async_server.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/network/example/http/echo_async_server.cpp b/libs/network/example/http/echo_async_server.cpp index 56aeb4e23..c017a32b6 100644 --- a/libs/network/example/http/echo_async_server.cpp +++ b/libs/network/example/http/echo_async_server.cpp @@ -224,16 +224,21 @@ int main() { auto io_service = std::make_shared(); echo_server server( echo_server::options(handler).io_service(io_service).port("8000")); - server.run(); // Clean shutdown when pressing Ctrl+C. boost::asio::signal_set signals(*io_service, SIGINT, SIGTERM); signals.async_wait([&server](const boost::system::error_code& ec, int /* signal_number */) { if (!ec) { + std::cout << "Stopping server... "; server.stop(); + std::cout << "done.\n"; } }); + + std::cout << "Press Ctrl+C to stop the server.\n"; + server.run(); + return EXIT_SUCCESS; } catch (const std::exception& error) { std::cerr << error.what() << std::endl; From 0a6f0dc821724acd564b17562bfc64eed21606ae Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 18:33:39 +1000 Subject: [PATCH 10/28] Update Travis config to support more compilers This change allows us to get more compilers and eventually more platforms being tested. --- .travis.yml | 85 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2048428be..eca76d11a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ sudo: false +dist: trusty language: cpp +os: +- linux compiler: - g++ - clang @@ -21,6 +24,73 @@ cache: - apt - ccache matrix: + include: + # GCC configurations + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.9 + env: + - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9" + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-5 + env: + - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-6 + env: + - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" + # Clang configurations + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.8 + packages: + - clang-3.8 + env: + - MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8" + - os: linux + addons: + apt: + sources: + - llvm-toolchain-trusty-3.9 + packages: + - clang-3.9 + env: + - MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9" + - os: linux + addons: + apt: + sources: + - llvm-toolchain-trusty-4.0 + packages: + - clang-4.0 + env: + - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0" + - os: linux + addons: + apt: + sources: + - llvm-toolchain-trusty-5.0 + packages: + - clang-5.0 + env: + - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0" exclude: - compiler: g++ env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" CMAKE_CXX_FLAGS="-fsanitize=thread" Uri_BUILD_TEST=OFF Uri_DISABLE_LIBCXX=YES @@ -29,19 +99,12 @@ matrix: # TODO(deanberris): It seems Boost is not msan-clean yet; report bugs and maybe fix? # - compiler: g++ # env: BOOST_VER=1.59.0 BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" CMAKE_CXX_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2" +before_install: +- eval "${MATRIX_EVAL}" install: - pwd - export CUR_DIR=`pwd` - mkdir -p ${CUR_DIR}/bin -- if [ "${CC}" = "gcc" ]; then - export CXX=g++-4.9; - export CC=gcc-4.9; - fi -- if [ "${CC}" = "clang" ]; then - export CXX=clang++-3.8; - export CC=clang-3.8; - export CCACHE_CPP2=yes; - fi before_script: - echo ${CXX} - "${CXX} --version" @@ -55,13 +118,11 @@ after_failure: addons: apt: sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.8 - kalakris-cmake - boost-latest - george-edison55-precise-backports packages: - - libboost1.55-all-dev + - libboost-all-dev - gcc-4.9 - g++-4.9 - clang-3.8 From 055789c4f7bc6674ba9ccf3408ab875be6f05c6a Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 18:37:37 +1000 Subject: [PATCH 11/28] fixup: cleanup unnecessary addons for trusty --- .travis.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index eca76d11a..f232b5c1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -117,17 +117,8 @@ after_failure: - cat build/Testing/Temporary/LastTest.log addons: apt: - sources: - - kalakris-cmake - - boost-latest - - george-edison55-precise-backports packages: - libboost-all-dev - - gcc-4.9 - - g++-4.9 - - clang-3.8 - - cmake - - cmake-data notifications: slack: secure: Y7lLjqZ83+b/jaJ5+EKwvgCDeERi4bVbDn9tLp8sieTdu+ENsPI+JmLYSXZXPpe7JrItrXW6uJJXN2wG1h7au4mpVVTghd31HBzuzrqVxDphWPhp16NYzvbAgQQRBXvFVvfSdW/Kb/n2fX6xDApY0t6vNREb/GKg0GyzESb4ZjU= From d5967eda47cba28111e6a38deb05f85cdcfe2d5a Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 18:47:42 +1000 Subject: [PATCH 12/28] fixup: use later version of boost, use env variables better? --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index f232b5c1a..9ee84e4eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ matrix: packages: - g++-4.9 env: - - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9" + - MATRIX_EVAL="CC=gcc-4.9 CXX=g++-4.9" - os: linux addons: apt: @@ -43,7 +43,7 @@ matrix: packages: - g++-5 env: - - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" + - MATRIX_EVAL="CC=gcc-5 CXX=g++-5" - os: linux addons: apt: @@ -52,7 +52,7 @@ matrix: packages: - g++-6 env: - - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" + - MATRIX_EVAL="CC=gcc-6 CXX=g++-6" # Clang configurations - os: linux addons: @@ -63,7 +63,7 @@ matrix: packages: - clang-3.8 env: - - MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8" + - MATRIX_EVAL="CC=clang-3.8 CXX=clang++-3.8" - os: linux addons: apt: @@ -72,7 +72,7 @@ matrix: packages: - clang-3.9 env: - - MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9" + - MATRIX_EVAL="CC=clang-3.9 CXX=clang++-3.9" - os: linux addons: apt: @@ -81,7 +81,7 @@ matrix: packages: - clang-4.0 env: - - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0" + - MATRIX_EVAL="CC=clang-4.0 CXX=clang++-4.0" - os: linux addons: apt: @@ -90,7 +90,7 @@ matrix: packages: - clang-5.0 env: - - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0" + - MATRIX_EVAL="CC=clang-5.0 CXX=clang++-5.0" exclude: - compiler: g++ env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" CMAKE_CXX_FLAGS="-fsanitize=thread" Uri_BUILD_TEST=OFF Uri_DISABLE_LIBCXX=YES @@ -118,7 +118,7 @@ after_failure: addons: apt: packages: - - libboost-all-dev + - libboost1.60-all-dev notifications: slack: secure: Y7lLjqZ83+b/jaJ5+EKwvgCDeERi4bVbDn9tLp8sieTdu+ENsPI+JmLYSXZXPpe7JrItrXW6uJJXN2wG1h7au4mpVVTghd31HBzuzrqVxDphWPhp16NYzvbAgQQRBXvFVvfSdW/Kb/n2fX6xDApY0t6vNREb/GKg0GyzESb4ZjU= From 7e9bd3f948bd5499b4e4824e52b661a8d79c8e87 Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 18:51:12 +1000 Subject: [PATCH 13/28] fixup: still too new of a boost. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9ee84e4eb..bd4e2dbcf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,6 +100,7 @@ matrix: # - compiler: g++ # env: BOOST_VER=1.59.0 BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" CMAKE_CXX_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2" before_install: +- echo "${MATRIX_EVAL}" - eval "${MATRIX_EVAL}" install: - pwd @@ -118,7 +119,7 @@ after_failure: addons: apt: packages: - - libboost1.60-all-dev + - libboost1.55-all-dev notifications: slack: secure: Y7lLjqZ83+b/jaJ5+EKwvgCDeERi4bVbDn9tLp8sieTdu+ENsPI+JmLYSXZXPpe7JrItrXW6uJJXN2wG1h7au4mpVVTghd31HBzuzrqVxDphWPhp16NYzvbAgQQRBXvFVvfSdW/Kb/n2fX6xDApY0t6vNREb/GKg0GyzESb4ZjU= From 0575a4e27d936b1a3dedea0c771b38136894949f Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 19:09:06 +1000 Subject: [PATCH 14/28] fixup: simplify config --- .travis.yml | 137 ++++++++++------------------------------------------ 1 file changed, 26 insertions(+), 111 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd4e2dbcf..195e9e3d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,125 +1,40 @@ -sudo: false -dist: trusty +# cpp-netlib Project Travis CI configuration. + language: cpp -os: -- linux -compiler: -- g++ -- clang -env: -- BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES -- BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES -- BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES -- BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES -- BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES -- BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES -- BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES -- BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES -# Support the sanitizers in clang only -- BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" CMAKE_CXX_FLAGS="-fsanitize=thread" Uri_BUILD_TEST=OFF Uri_DISABLE_LIBCXX=YES -- BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" CMAKE_CXX_FLAGS="-fsanitize=address" Uri_BUILD_TEST=OFF Uri_DISABLE_LIBCXX=YES -# TODO(deanberris): It seems Boost is not msan-clean yet; report bugs and maybe fix? -#- BOOST_VER=1.59.0 BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" CMAKE_CXX_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2" +os: linux +dist: trusty +sudo: false + cache: - apt - ccache + matrix: include: # GCC configurations - - os: linux - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.9 - env: - - MATRIX_EVAL="CC=gcc-4.9 CXX=g++-4.9" - - os: linux - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-5 - env: - - MATRIX_EVAL="CC=gcc-5 CXX=g++-5" - - os: linux - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-6 - env: - - MATRIX_EVAL="CC=gcc-6 CXX=g++-6" - # Clang configurations - - os: linux - addons: - apt: - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.8 - packages: - - clang-3.8 - env: - - MATRIX_EVAL="CC=clang-3.8 CXX=clang++-3.8" - - os: linux - addons: - apt: - sources: - - llvm-toolchain-trusty-3.9 - packages: - - clang-3.9 - env: - - MATRIX_EVAL="CC=clang-3.9 CXX=clang++-3.9" - - os: linux - addons: - apt: - sources: - - llvm-toolchain-trusty-4.0 - packages: - - clang-4.0 - env: - - MATRIX_EVAL="CC=clang-4.0 CXX=clang++-4.0" - - os: linux - addons: - apt: - sources: - - llvm-toolchain-trusty-5.0 - packages: - - clang-5.0 - env: - - MATRIX_EVAL="CC=clang-5.0 CXX=clang++-5.0" - exclude: - - compiler: g++ - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" CMAKE_CXX_FLAGS="-fsanitize=thread" Uri_BUILD_TEST=OFF Uri_DISABLE_LIBCXX=YES - - compiler: g++ - env: BOOST_VER=1.59.0 BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" CMAKE_CXX_FLAGS="-fsanitize=address" Uri_BUILD_TEST=OFF Uri_DISABLE_LIBCXX=YES -# TODO(deanberris): It seems Boost is not msan-clean yet; report bugs and maybe fix? -# - compiler: g++ -# env: BOOST_VER=1.59.0 BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" CMAKE_CXX_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2" -before_install: -- echo "${MATRIX_EVAL}" -- eval "${MATRIX_EVAL}" + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } + install: -- pwd -- export CUR_DIR=`pwd` -- mkdir -p ${CUR_DIR}/bin + - pwd + - export CUR_DIR=`pwd` + - mkdir -p ${CUR_DIR}/bin + before_script: -- echo ${CXX} -- "${CXX} --version" -- echo ${CC} -- "${CC} --version" + - echo ${CXX} + - "${CXX} --version" + - echo ${CC} + - "${CC} --version" + script: -- pwd -- sh -x build.sh + - pwd + - sh -x build.sh + after_failure: -- cat build/Testing/Temporary/LastTest.log -addons: - apt: - packages: - - libboost1.55-all-dev + - cat build/Testing/Temporary/LastTest.log + notifications: slack: secure: Y7lLjqZ83+b/jaJ5+EKwvgCDeERi4bVbDn9tLp8sieTdu+ENsPI+JmLYSXZXPpe7JrItrXW6uJJXN2wG1h7au4mpVVTghd31HBzuzrqVxDphWPhp16NYzvbAgQQRBXvFVvfSdW/Kb/n2fX6xDApY0t6vNREb/GKg0GyzESb4ZjU= From 24b38e746519bfc8f6749f64a27ef518e4cb4f93 Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 19:17:07 +1000 Subject: [PATCH 15/28] fixup: export CC and CXX properly --- .travis.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 195e9e3d7..7050425b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,18 +16,28 @@ matrix: addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } install: + - if [[ "${CXX}" != "" ]]; then export CXX=${CXX}; fi + - if [[ "${CC}" != "" ]]; then export CC=${CC}; fi + - "${CXX} --version" + - "${CC} --version" - pwd - export CUR_DIR=`pwd` - mkdir -p ${CUR_DIR}/bin -before_script: - - echo ${CXX} - - "${CXX} --version" - - echo ${CC} - - "${CC} --version" - script: - pwd - sh -x build.sh From c70cc303fce4ac6a0d5dcedd07d470e3c03fcaf9 Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 19:24:19 +1000 Subject: [PATCH 16/28] fixup: workaround CC and CXX shadowing --- .travis.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7050425b2..cc633460d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,26 +12,26 @@ cache: matrix: include: # GCC configurations - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES CC=gcc-4.9 CXX=g++-4.9 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } install: - - if [[ "${CXX}" != "" ]]; then export CXX=${CXX}; fi - - if [[ "${CC}" != "" ]]; then export CC=${CC}; fi + - if [[ "${CXX}" != "" ]]; then export CXX=${NEWCXX}; fi + - if [[ "${CC}" != "" ]]; then export CC=${NEWCC}; fi - "${CXX} --version" - "${CC} --version" - pwd From 7d9dc5815ef32966ceb30ea24dbb141d341f8af3 Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 19:33:56 +1000 Subject: [PATCH 17/28] fixup: add GCC 5 and clang 3.8 configs --- .travis.yml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cc633460d..33e23385d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ cache: matrix: include: - # GCC configurations + # GCC 4.9 configurations - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 @@ -28,6 +28,40 @@ matrix: addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } + # GCC 5.0 configurations + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } + # Clang 3.8 configurations + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } install: - if [[ "${CXX}" != "" ]]; then export CXX=${NEWCXX}; fi From bb69c20fe754932f5da764bd2221600983d88196 Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 19:42:49 +1000 Subject: [PATCH 18/28] fixup: fix Uri_DISABLE_LIBNEWCXX -> Uri_DISABLE_LIBCXX --- .travis.yml | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33e23385d..f4f86999a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,55 +12,55 @@ cache: matrix: include: # GCC 4.9 configurations - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-4.9 NEWCXX=g++-4.9 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-4.9", "libboost1.55-all-dev"] } } # GCC 5.0 configurations - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=gcc-5 NEWCXX=g++-5 addons: { apt: { sources: ["ubuntu-toolchain-r-test"], packages: ["g++-5", "libboost1.55-all-dev"] } } # Clang 3.8 configurations - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } - - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBNEWCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } install: From 99c0f84067632d4ec4a30b3708da2c3b693ab2ee Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 19:51:20 +1000 Subject: [PATCH 19/28] fixup: support clang 4.0 and clang 5.0 --- .travis.yml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/.travis.yml b/.travis.yml index f4f86999a..7affeb131 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,6 +62,57 @@ matrix: addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.8 NEWCXX=clang++-3.8 addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["clang-3.8", "libboost1.55-all-dev"] } } + # Clang 3.9 configurations + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.9 NEWCXX=clang++-3.9 + addons: { apt: { sources: ["llvm-toolchain-trusty-3.9"], packages: ["clang-3.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.9 NEWCXX=clang++-3.9 + addons: { apt: { sources: ["llvm-toolchain-trusty-3.9"], packages: ["clang-3.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.9 NEWCXX=clang++-3.9 + addons: { apt: { sources: ["llvm-toolchain-trusty-3.9"], packages: ["clang-3.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.9 NEWCXX=clang++-3.9 + addons: { apt: { sources: ["llvm-toolchain-trusty-3.9"], packages: ["clang-3.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.9 NEWCXX=clang++-3.9 + addons: { apt: { sources: ["llvm-toolchain-trusty-3.9"], packages: ["clang-3.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.9 NEWCXX=clang++-3.9 + addons: { apt: { sources: ["llvm-toolchain-trusty-3.9"], packages: ["clang-3.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.9 NEWCXX=clang++-3.9 + addons: { apt: { sources: ["llvm-toolchain-trusty-3.9"], packages: ["clang-3.9", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-3.9 NEWCXX=clang++-3.9 + addons: { apt: { sources: ["llvm-toolchain-trusty-3.9"], packages: ["clang-3.9", "libboost1.55-all-dev"] } } + # Clang 4.0 configurations + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-4.0 NEWCXX=clang++-4.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-4.0"], packages: ["clang-4.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-4.0 NEWCXX=clang++-4.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-4.0"], packages: ["clang-4.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-4.0 NEWCXX=clang++-4.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-4.0"], packages: ["clang-4.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-4.0 NEWCXX=clang++-4.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-4.0"], packages: ["clang-4.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-4.0 NEWCXX=clang++-4.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-4.0"], packages: ["clang-4.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-4.0 NEWCXX=clang++-4.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-4.0"], packages: ["clang-4.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-4.0 NEWCXX=clang++-4.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-4.0"], packages: ["clang-4.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-4.0 NEWCXX=clang++-4.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-4.0"], packages: ["clang-4.0", "libboost1.55-all-dev"] } } + # Clang 5.0 configurations + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-5.0 NEWCXX=clang++-5.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-5.0"], packages: ["clang-5.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-5.0 NEWCXX=clang++-5.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-5.0"], packages: ["clang-5.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-5.0 NEWCXX=clang++-5.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-5.0"], packages: ["clang-5.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-5.0 NEWCXX=clang++-5.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-5.0"], packages: ["clang-5.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-5.0 NEWCXX=clang++-5.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-5.0"], packages: ["clang-5.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-5.0 NEWCXX=clang++-5.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-5.0"], packages: ["clang-5.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="ON" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-5.0 NEWCXX=clang++-5.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-5.0"], packages: ["clang-5.0", "libboost1.55-all-dev"] } } + - env: BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" ENABLE_HTTPS="OFF" Uri_BUILD_TESTS=OFF Uri_DISABLE_LIBCXX=YES NEWCC=clang-5.0 NEWCXX=clang++-5.0 + addons: { apt: { sources: ["llvm-toolchain-trusty-5.0"], packages: ["clang-5.0", "libboost1.55-all-dev"] } } install: - if [[ "${CXX}" != "" ]]; then export CXX=${NEWCXX}; fi From 61b166f732dfab4e488e037727792cb07804aba6 Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 14 Jun 2018 20:32:53 +1000 Subject: [PATCH 20/28] fixup: set CCACHE_CPP2=yes as a global --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7affeb131..7e6154d4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,10 @@ cache: - apt - ccache +env: + global: + - CCACHE_CPP2=yes + matrix: include: # GCC 4.9 configurations From 051e508a38d191df70b5baa892d671a23e272feb Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Fri, 4 Jan 2019 16:39:35 +1100 Subject: [PATCH 21/28] Update submodules to latest master --- deps/asio | 2 +- deps/cxxopts | 2 +- deps/googletest | 2 +- deps/uri | 2 +- libs/network/doc/_ext/breathe | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deps/asio b/deps/asio index 66e76b9e4..22afb8608 160000 --- a/deps/asio +++ b/deps/asio @@ -1 +1 @@ -Subproject commit 66e76b9e4252ff4681227d0d8e34374ec1fa20e5 +Subproject commit 22afb86087a77037cd296d27134756c9b0d2cb75 diff --git a/deps/cxxopts b/deps/cxxopts index aec97a6f5..3d405ef16 160000 --- a/deps/cxxopts +++ b/deps/cxxopts @@ -1 +1 @@ -Subproject commit aec97a6f53c3486fc51e0d9857f10b683180d668 +Subproject commit 3d405ef1639a918ea8798666e2b02eb9cef889c0 diff --git a/deps/googletest b/deps/googletest index d225acc90..3880b13e4 160000 --- a/deps/googletest +++ b/deps/googletest @@ -1 +1 @@ -Subproject commit d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0 +Subproject commit 3880b13e4c0b04ca88f69b9c93da6058bd836c34 diff --git a/deps/uri b/deps/uri index ae076acc0..76f0781f4 160000 --- a/deps/uri +++ b/deps/uri @@ -1 +1 @@ -Subproject commit ae076acc01b2a0c2f973aadbe9a5e4b080fdc88c +Subproject commit 76f0781f45d9a79c2a2bde9cabe76368cc6892c1 diff --git a/libs/network/doc/_ext/breathe b/libs/network/doc/_ext/breathe index 65440b267..1767274e0 160000 --- a/libs/network/doc/_ext/breathe +++ b/libs/network/doc/_ext/breathe @@ -1 +1 @@ -Subproject commit 65440b2673ebcc5c6ee2792b0b25754effba1183 +Subproject commit 1767274e0f59eb707f2b6256d51b12a3a4341da8 From dab9f517d80bbe1f6f936e68271e305f22a73ead Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 10 Jan 2019 03:14:58 +1100 Subject: [PATCH 22/28] Rename code_of_conduct.md to CODE_OF_CONDUCT.md (#868) This allows GitHub to automatically surface this information in the UI. --- code_of_conduct.md => CODE_OF_CONDUCT.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename code_of_conduct.md => CODE_OF_CONDUCT.md (100%) diff --git a/code_of_conduct.md b/CODE_OF_CONDUCT.md similarity index 100% rename from code_of_conduct.md rename to CODE_OF_CONDUCT.md From 7cbd52cf8f9291ae1b4bd943ab6ac59d536c8db0 Mon Sep 17 00:00:00 2001 From: rpriest1260 <34449635+rpriest1260@users.noreply.github.com> Date: Wed, 29 May 2019 09:35:20 -0400 Subject: [PATCH 23/28] The CmakeLists.txt file in the cpp-netlib repository incorrectly sets (#873) the lib suffixes when building with CPP-NETLIB_STATIC_OPENSSL on a Windows Machine. Adding an 'If (WIN32)' condition to properly set CMAKE_FIND_LIBRARY_SUFFIXES to '.lib' on a windows machine. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 56534f32f..5946295ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,11 @@ if (CPP-NETLIB_ENABLE_HTTPS) endif() endif() if (CPP-NETLIB_STATIC_OPENSSL) - set(CMAKE_FIND_LIBRARY_SUFFIXES .a) + if (WIN32) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib) + else() + set(CMAKE_FIND_LIBRARY_SUFFIXES .a) + endif() endif() find_package(OpenSSL) endif() From 59fabb8123c1216ac090accb1b9f9ee9d258af6c Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Sat, 14 Mar 2020 16:55:58 +0800 Subject: [PATCH 24/28] Add vcpkg installation instructions (#884) --- README.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.rst b/README.rst index 5d351980b..4a19a91d5 100644 --- a/README.rst +++ b/README.rst @@ -81,6 +81,19 @@ you can now build the tests and run them:: $ make $ make test +You can also download and install cpp-netlib using the ` vcpkg`_ dependency manager: + + $ git clone https://github.com/Microsoft/vcpkg.git + $ cd vcpkg + $ ./bootstrap-vcpkg.sh + $ ./vcpkg integrate install + $ vcpkg install cpp-netlib + +The cpp-netlib port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the ` vcpkg`_ repository. + +.. _`vcpkg`: https://github.com/Microsoft/vcpkg + + If for some reason some of the tests fail, you can send the files in ``Testing/Temporary/`` as attachments to the cpp-netlib `developers mailing list`_. From 69d2c1146862005fb5ecc1b863fd14c4e49f306b Mon Sep 17 00:00:00 2001 From: jinyuqi Date: Sat, 9 May 2020 00:13:11 +0800 Subject: [PATCH 25/28] Fix build failed for cxxopt submodule updating (#886) Co-authored-by: Jin Yuqi (Ricky) --- libs/network/example/CMakeLists.txt | 1 + libs/network/example/http_client.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libs/network/example/CMakeLists.txt b/libs/network/example/CMakeLists.txt index 0031f3a53..e647a8e69 100644 --- a/libs/network/example/CMakeLists.txt +++ b/libs/network/example/CMakeLists.txt @@ -5,6 +5,7 @@ include_directories(${CPP-NETLIB_SOURCE_DIR}) include_directories(${CPP-NETLIB_SOURCE_DIR}/deps/cxxopts/src) +include_directories(${CPP-NETLIB_SOURCE_DIR}/deps/cxxopts/include) if (OPENSSL_FOUND) include_directories(${OPENSSL_INCLUDE_DIR}) endif (OPENSSL_FOUND) diff --git a/libs/network/example/http_client.cpp b/libs/network/example/http_client.cpp index 439176192..1a717805c 100644 --- a/libs/network/example/http_client.cpp +++ b/libs/network/example/http_client.cpp @@ -29,22 +29,22 @@ int main(int argc, char* argv[]) { ; options.parse_positional(std::vector{"source"}); - options.parse(argc, argv); + auto optionsResults = options.parse(argc, argv); - if (options.count("help")) { + if (optionsResults.count("help")) { std::cout << options.help({"", "Group"}) << std::endl; return EXIT_SUCCESS; } - if (options.count("source") < 1) { + if (optionsResults.count("source") < 1) { std::cout << "Error: Source URL required." << std::endl; std::cout << options.help({"", "Group"}) << std::endl; return EXIT_FAILURE; } - std::string source = options["source"].as(); - bool show_headers = options.count("headers") ? true : false; - bool show_status = options.count("status") ? true : false; + std::string source = optionsResults["source"].as(); + bool show_headers = optionsResults.count("headers") ? true : false; + bool show_status = optionsResults.count("status") ? true : false; http::client::request request(source); http::client::string_type destination_ = host(request); From 96a087a1a68d276d9ffa8fc474e78f691ab73bf9 Mon Sep 17 00:00:00 2001 From: gns333 Date: Wed, 27 Jan 2021 19:01:20 +0800 Subject: [PATCH 26/28] Add clear_resolved_cache implementation (#893) --- .../network/protocol/http/policies/async_resolver.hpp | 10 ++++++++-- boost/network/protocol/http/policies/sync_resolver.hpp | 9 ++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/boost/network/protocol/http/policies/async_resolver.hpp b/boost/network/protocol/http/policies/async_resolver.hpp index c03cd5a36..4e508364a 100644 --- a/boost/network/protocol/http/policies/async_resolver.hpp +++ b/boost/network/protocol/http/policies/async_resolver.hpp @@ -36,18 +36,21 @@ struct async_resolver : std::enable_shared_from_this > { typedef std::function resolve_function; + void clear_resolved_cache() { clear_cache_.store(true); } + protected: bool cache_resolved_; + std::atomic clear_cache_; endpoint_cache endpoint_cache_; std::shared_ptr service_; std::shared_ptr resolver_strand_; explicit async_resolver(bool cache_resolved) - : cache_resolved_(cache_resolved), endpoint_cache_() {} + : cache_resolved_(cache_resolved), clear_cache_(false), endpoint_cache_() {} void resolve(resolver_type &resolver_, string_type const &host, std::uint16_t port, resolve_completion_function once_resolved) { - if (cache_resolved_) { + if (cache_resolved_ && !clear_cache_.load()) { typename endpoint_cache::iterator iter = endpoint_cache_.find(boost::to_lower_copy(host)); if (iter != endpoint_cache_.end()) { @@ -74,6 +77,9 @@ struct async_resolver : std::enable_shared_from_this > { typename endpoint_cache::iterator iter; bool inserted = false; if (!ec && cache_resolved_) { + if (clear_cache_.exchange(false)) { + endpoint_cache_.clear(); + } std::tie(iter, inserted) = endpoint_cache_.insert(std::make_pair( host, std::make_pair(endpoint_iterator, resolver_iterator()))); once_resolved(ec, iter->second); diff --git a/boost/network/protocol/http/policies/sync_resolver.hpp b/boost/network/protocol/http/policies/sync_resolver.hpp index 7c9c2c7f4..09d373b87 100644 --- a/boost/network/protocol/http/policies/sync_resolver.hpp +++ b/boost/network/protocol/http/policies/sync_resolver.hpp @@ -27,19 +27,26 @@ struct sync_resolver { typedef std::pair resolver_iterator_pair; + void clear_resolved_cache() { clear_cache_.store(true); } + protected: typedef typename string::type string_type; typedef std::unordered_map resolved_cache; resolved_cache endpoint_cache_; bool cache_resolved_; + std::atomic clear_cache_; - explicit sync_resolver(bool cache_resolved) : cache_resolved_(cache_resolved) {} + explicit sync_resolver(bool cache_resolved) + : cache_resolved_(cache_resolved), clear_cache_(false) {} resolver_iterator_pair resolve(resolver_type& resolver_, string_type /*unused*/const& hostname, string_type const& port) { if (cache_resolved_) { + if (clear_cache_.exchange(false)) { + endpoint_cache_.clear(); + } typename resolved_cache::iterator cached_iterator = endpoint_cache_.find(hostname); if (cached_iterator == endpoint_cache_.end()) { From d42fb59a64a60f8495179b71d88bf32e93448133 Mon Sep 17 00:00:00 2001 From: Randy Li Date: Fri, 1 Sep 2023 12:04:59 +0800 Subject: [PATCH 27/28] Fixup asio old service removed after boost 1.69 (#901) BOOST_ASIO_ENABLE_OLD_SERVICES option and all those header files are removed from boost asio 1.70. Signed-off-by: Hsia-Jun(Randy) Li Co-authored-by: Hsia-Jun(Randy) Li --- boost/network/protocol/stream_handler.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boost/network/protocol/stream_handler.hpp b/boost/network/protocol/stream_handler.hpp index 62c97ec4a..cd98b6875 100644 --- a/boost/network/protocol/stream_handler.hpp +++ b/boost/network/protocol/stream_handler.hpp @@ -13,12 +13,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #ifdef BOOST_NETWORK_ENABLE_HTTPS From 552ce94bd91c055f11ba524adf0ca0712063d711 Mon Sep 17 00:00:00 2001 From: jalegido Date: Thu, 7 Sep 2023 14:06:56 +0200 Subject: [PATCH 28/28] Compatibility with boost 1.83 (#902) Co-authored-by: jjll --- libs/network/src/server_request_parsers_impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/network/src/server_request_parsers_impl.cpp b/libs/network/src/server_request_parsers_impl.cpp index 9a539b1ae..d3670e924 100644 --- a/libs/network/src/server_request_parsers_impl.cpp +++ b/libs/network/src/server_request_parsers_impl.cpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { namespace spirit { @@ -22,7 +23,7 @@ typedef std::basic_string u32_string; template <> // struct assign_to_container_from_value { static void call(u32_string const& val, std::string& attr) { - u32_to_u8_iterator begin = val.begin(), + boost::u32_to_u8_iterator begin = val.begin(), end = val.end(); for (; begin != end; ++begin) attr += *begin; }