-
Notifications
You must be signed in to change notification settings - Fork 425
Modernize cmake scripts and support MSVC 2017 #834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 0.13-release
Are you sure you want to change the base?
Changes from all commits
2cb82ec
cbb10e6
4a202d3
604d50e
48bbadb
3c777df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,22 +49,21 @@ namespace http { | |
BOOST_NETWORK_INLINE void parse_version( | ||
std::string const& partial_parsed, | ||
std::tuple<std::uint8_t, std::uint8_t>& version_pair) { | ||
using namespace boost::spirit::qi; | ||
parse(partial_parsed.begin(), partial_parsed.end(), | ||
(lit("HTTP/") >> ushort_ >> '.' >> ushort_), version_pair); | ||
boost::spirit::qi::parse(partial_parsed.begin(), partial_parsed.end(), | ||
(boost::spirit::qi::lit("HTTP/") >> boost::spirit::qi::ushort_ >> '.' >> boost::spirit::qi::ushort_), version_pair); | ||
} | ||
|
||
BOOST_NETWORK_INLINE void parse_headers( | ||
std::string const& input, std::vector<request_header_narrow>& container) { | ||
u8_to_u32_iterator<std::string::const_iterator> begin = input.begin(), | ||
end = input.end(); | ||
using namespace boost::spirit::qi; | ||
typedef as<boost::spirit::traits::u32_string> as_u32_string; | ||
parse(begin, end, | ||
*(+((alnum | punct) - ':') >> lit(": ") >> | ||
as_u32_string()[+((unicode::alnum | space | punct) - '\r' - '\n')] >> | ||
lit("\r\n")) >> | ||
lit("\r\n"), | ||
|
||
using as_u32_string = boost::spirit::qi::as<boost::spirit::traits::u32_string>; | ||
boost::spirit::qi::parse(begin, end, | ||
*(+((boost::spirit::qi::alnum | boost::spirit::qi::punct) - ':') >> boost::spirit::qi::lit(": ") >> | ||
as_u32_string()[+((boost::spirit::qi::unicode::alnum | boost::spirit::qi::space | boost::spirit::qi::punct) - '\r' - '\n')] >> | ||
boost::spirit::qi::lit("\r\n")) >> | ||
boost::spirit::qi::lit("\r\n"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you separate out this change, (or rebase) to its own pull request? |
||
container); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
#include <boost/asio/detail/throw_error.hpp> | ||
#include <boost/asio/error.hpp> | ||
#include <boost/asio/stream_socket_service.hpp> | ||
#include <boost/asio/io_service.hpp> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this strictly necessary? If so, can you make this a self-contained PR? |
||
#include <cstddef> | ||
|
||
#ifdef BOOST_NETWORK_ENABLE_HTTPS | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,38 @@ | ||
# - Config file for the cppnetlib package | ||
# It defines the following variables | ||
# CPPNETLIB_INCLUDE_DIRS - include directories for cppnetlib | ||
# CPPNETLIB_LIBRARIES - libraries to link against | ||
# CPPNETLIB_EXECUTABLE - the bar executable | ||
|
||
# Compute paths | ||
get_filename_component(CPPNETLIB_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
set(CPPNETLIB_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") | ||
|
||
# Our library dependencies (contains definitions for IMPORTED targets) | ||
if( NOT TARGET cppnetlib-client-connections | ||
AND NOT TARGET cppnetlib-server-parsers | ||
AND NOT TARGET cppnetlib-uri | ||
AND NOT CPPNETLIB_BINARY_DIR) | ||
include("${CPPNETLIB_CMAKE_DIR}/cppnetlibTargets.cmake") | ||
# - Config file for the cppnetlib package | ||
# It defines the following variables targets | ||
# cppnetlib::cppnetlib - include directories and usage requirements for cppnetlib | ||
# Libraries and usage requirements^ | ||
# cppnetlib::uri | ||
# cppnetlib::server-parsers | ||
# cppnetlib::client-connections | ||
# Variables | ||
# CPPNETLIB_INCLUDE_DIRS - include directories for cppnetlib (empty, usage requirements propageted through libraries) | ||
# CPPNETLIB_LIBRARIES - libraries to link against | ||
|
||
set(CPP-NETLIB_STATIC_BOOST @CPP-NETLIB_STATIC_BOOST@) | ||
set(CPP-NETLIB_ENABLE_HTTPS @CPP-NETLIB_ENABLE_HTTPS@) | ||
set(CPP-NETLIB_STATIC_OPENSSL @CPP-NETLIB_STATIC_OPENSSL@) | ||
|
||
# Use Boost's static libraries | ||
if (CPP-NETLIB_STATIC_BOOST) | ||
set(Boost_USE_STATIC_LIBS ON) | ||
endif() | ||
|
||
# Always use multi-threaded Boost libraries. | ||
set(Boost_USE_MULTITHREADED ON) | ||
|
||
if (CPP-NETLIB_ENABLE_HTTPS) | ||
if (CPP-NETLIB_STATIC_OPENSSL) | ||
set(OPENSSL_USE_STATIC_LIBS TRUE) | ||
endif() | ||
|
||
find_package(OpenSSL REQUIRED) | ||
endif() | ||
|
||
# These are IMPORTED targets created by cppnetlibTargets.cmake | ||
set(CPPNETLIB_LIBRARIES | ||
cppnetlib-client-connections | ||
cppnetlib-server-parsers | ||
cppnetlib-uri) | ||
#set(CPPNETLIB_EXECUTABLE ...) # maybe the examples? | ||
find_package(Boost 1.58.0 REQUIRED COMPONENTS system thread regex) | ||
find_package(Threads) | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/cppnetlibTargets.cmake") | ||
|
||
set(CPPNETLIB_INCLUDE_DIRS) | ||
set(CPPNETLIB_LIBRARIES cppnetlib::client-connections cppnetlib::server-parsers cppnetlib::uri) |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please re-base, as I've just merged a change that addresses this particular issue.