Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make it possible to build cpp-netlib using Boost.Build.

- Include '*~' pattern into .gitignore
- Build libraries in accordance with CMake script
- Build tests in accordance with CMake script
  • Loading branch information...
commit 9a52e173943fa5d003031a9761ecb1edadb49c1a 1 parent d05ad3f
@tysonite tysonite authored
View
1  .gitignore
@@ -10,3 +10,4 @@ libs/mime/test/mime-roundtrip
bin/
tests/
_build
+*~
View
2  Jamroot
@@ -6,7 +6,7 @@
import os ;
-local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;
+path-constant BOOST_ROOT : [ os.environ BOOST_ROOT ] ;
use-project /boost : $(BOOST_ROOT) ;
use-project /cpp-netlib : libs/network/build ;
View
68 libs/network/build/Jamfile.v2
@@ -4,27 +4,75 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
-import os ;
-
-local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;
+import pch ;
project cpp-netlib :
requirements
- <include>../../../
+ <variant>debug:<define>NETWORK_DEBUG
+ <toolset>gcc:<define>NETWORK_ENABLE_HTTPS
+ <toolset>gcc:<cxxflags>-std=c++0x
+ <include>../../../include
<include>$(BOOST_ROOT)
<c++-template-depth>256
+ <link>static
: source-location ../../../
;
-cpp-pch client : boost/network/include/http/client.hpp ;
-cpp-pch server : boost/network/include/http/server.hpp ;
-lib cppnetlib-uri : libs/network/src/uri/parse.cpp ;
-lib cppnetlib-server-parsers : libs/network/src/server_request_parsers_impl.cpp ;
-lib cppnetlib-client-connections : libs/network/src/client.cpp ;
+cpp-pch client : include/network/include/http/client.hpp ;
+cpp-pch server : include/network/include/http/server.hpp ;
+lib cppnetlib-uri : libs/network/src/uri/normalize.cpp
+ libs/network/src/uri/schemes.cpp
+ libs/network/src/uri/uri.cpp ;
+
+lib cppnetlib-message : libs/network/src/message/message.cpp cppnetlib-uri ;
+lib cppnetlib-message-directives : libs/network/src/message/directives.cpp ;
+lib cppnetlib-message-wrappers : libs/network/src/message/wrappers.cpp ;
+lib cppnetlib-http-message : libs/network/src/http/request.cpp
+ libs/network/src/http/response.cpp
+ cppnetlib-message ;
+
+lib cppnetlib-http-message-wrappers : libs/network/src/http/message/wrappers.cpp ;
+lib cppnetlib-http-server-parsers : libs/network/src/server_request_parsers_impl.cpp ;
+lib cppnetlib-http-server : libs/network/src/http/server_async_impl.cpp
+ libs/network/src/http/server_options.cpp
+ libs/network/src/http/server_socket_options_setter.cpp
+ libs/network/src/http/server_sync_impl.cpp
+ cppnetlib-constants
+ cppnetlib-uri
+ cppnetlib-message
+ cppnetlib-message-wrappers
+ cppnetlib-message-directives
+ cppnetlib-http-message
+ cppnetlib-http-message-wrappers
+ cppnetlib-http-server-parsers ;
+
+lib cppnetlib-http-client-connections : libs/network/src/http/client_connections.cpp
+ libs/network/src/http/simple_connection_manager.cpp
+ libs/network/src/http/simple_connection_factory.cpp
+ libs/network/src/http/connection_delegate_factory.cpp
+ libs/network/src/http/client_resolver_delegate.cpp
+ libs/network/src/http/client_resolver_delegate_factory.cpp
+ libs/network/src/http/client_connection_delegates.cpp
+ libs/network/src/http/client_connection_factory.cpp
+ libs/network/src/http/client_async_resolver.cpp
+ libs/network/src/http/client_connection_normal.cpp ;
+
+lib cppnetlib-http-client : libs/network/src/http/client.cpp
+ cppnetlib-constants
+ cppnetlib-uri
+ cppnetlib-message
+ cppnetlib-message-wrappers
+ cppnetlib-message-directives
+ cppnetlib-http-message
+ cppnetlib-http-message-wrappers
+ cppnetlib-http-client-connections ;
+
+lib cppnetlib-utils-thread_pool : libs/network/src/utils/thread_pool.cpp ;
+lib cppnetlib-constants : libs/network/src/constants.cpp ;
install headers : client server
: <location>../../../boost/network/include/http ;
-install libraries : cppnetlib-uri cppnetlib-server-parsers cppnetlib-client-connections ;
+install libraries : cppnetlib-uri ;
alias all : headers ;
View
25 libs/network/test/Jamfile.v2
@@ -1,4 +1,4 @@
-
+
# Copyright Dean Michael Berris 2007.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
@@ -15,24 +15,23 @@ if [ os.name ] = CYGWIN
project network_test :
requirements
- <include>../../../
- <include>.
+ <include>../../../include
<source>/boost//unit_test_framework
<source>/boost//system
<source>/boost//date_time
<source>/boost//regex
<source>/boost//thread
<source>/boost//filesystem
- <variant>debug:<define>BOOST_NETWORK_DEBUG
- <toolset>gcc:<define>BOOST_NETWORK_ENABLE_HTTPS
+ <variant>debug:<define>NETWORK_DEBUG
+ <toolset>gcc:<define>NETWORK_ENABLE_HTTPS
<toolset>gcc:<linkflags>-lpthread
<toolset>gcc:<linkflags>-lssl
<toolset>gcc:<linkflags>-lcrypto
- <toolset>darwin:<define>BOOST_NETWORK_ENABLE_HTTPS
+ <toolset>darwin:<define>NETWORK_ENABLE_HTTPS
<toolset>darwin:<linkflags>-lpthread
<toolset>darwin:<linkflags>-lssl
<toolset>darwin:<linkflags>-lcrypto
- <toolset>clang:<define>BOOST_NETWORK_ENABLE_HTTPS
+ <toolset>clang:<define>NETWORK_ENABLE_HTTPS
<toolset>clang:<linkflags>-lpthread
<toolset>clang:<linkflags>-lssl
<toolset>clang:<linkflags>-lcrypto
@@ -43,7 +42,7 @@ project network_test :
<toolset>msvc:<define>BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN
<toolset>msvc:<define>WIN32_LEAN_AND_MEAN
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
- <toolset>msvc:<define>_WIN32_WINNT=0x0501
+ <toolset>msvc:<define>_WIN32_WINNT=0x0501
<c++-template-depth>256
<link>static
;
@@ -51,5 +50,11 @@ project network_test :
build-project http ;
build-project uri ;
-run message_test.cpp ;
-run message_transform_test.cpp ;
+run message_test.cpp /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-directives
+ /cpp-netlib//cppnetlib-message-wrappers ;
+
+run message_transform_test.cpp /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-directives
+ /cpp-netlib//cppnetlib-message-wrappers ;
+
View
139 libs/network/test/http/Jamfile.v2
@@ -10,35 +10,125 @@ import feature ;
project network_test/http :
requirements
- <include>../../../../
- <include>../
- <variant>debug:<define>BOOST_NETWORK_DEBUG
+ <variant>debug:<define>NETWORK_DEBUG
+ <toolset>gcc:<cxxflags>-std=c++0x
;
-run client_constructor_test.cpp /cpp-netlib//cppnetlib-uri /cpp-netlib//cppnetlib-client-connections ;
-run client_get_test.cpp /cpp-netlib//cppnetlib-uri /cpp-netlib//cppnetlib-client-connections ;
-run client_get_different_port_test.cpp /cpp-netlib//cppnetlib-uri /cpp-netlib//cppnetlib-client-connections ;
-run client_get_timeout_test.cpp /cpp-netlib//cppnetlib-uri /cpp-netlib//cppnetlib-client-connections ;
-#run client_include_inlined.cpp : <define>BOOST_NETWORK_NO_LIB ;
-run client_localhost_normal_test.cpp /cpp-netlib//cppnetlib-uri /cpp-netlib//cppnetlib-client-connections ;
-run client_localhost_ssl_test.cpp /cpp-netlib//cppnetlib-uri /cpp-netlib//cppnetlib-client-connections ;
-run message_async_ready_test.cpp ;
-run message_test.cpp /cpp-netlib//cppnetlib-uri ;
-run request_incremental_parser_test.cpp ;
-run request_linearize_test.cpp /cpp-netlib//cppnetlib-uri ;
-run response_incremental_parser_test.cpp /cpp-netlib//cppnetlib-server-parsers ;
-run server_constructor_test.cpp /cpp-netlib//cppnetlib-server-parsers ;
+run request_base_test.cpp /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-message-wrappers
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-constants ;
+
+run request_test.cpp /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-message-wrappers
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-constants ;
+
+run request_linearize_test.cpp /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-message-wrappers
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-constants ;
+
+run response_test.cpp /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-message-wrappers
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-constants ;
+
+run client_constructor_test.cpp /cpp-netlib//cppnetlib-constants
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-message-directives
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-message-wrappers
+ /cpp-netlib//cppnetlib-http-client
+ /cpp-netlib//cppnetlib-http-client-connections ;
+
+run client_get_test.cpp /cpp-netlib//cppnetlib-constants
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-message-directives
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-message-wrappers
+ /cpp-netlib//cppnetlib-http-client
+ /cpp-netlib//cppnetlib-http-client-connections ;
+
+run client_get_different_port_test.cpp /cpp-netlib//cppnetlib-constants
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-message-directives
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-message-wrappers
+ /cpp-netlib//cppnetlib-http-client
+ /cpp-netlib//cppnetlib-http-client-connections ;
+
+run client_get_timeout_test.cpp /cpp-netlib//cppnetlib-constants
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-message-directives
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-message-wrappers
+ /cpp-netlib//cppnetlib-http-client
+ /cpp-netlib//cppnetlib-http-client-connections ;
+
+run client_get_streaming_test.cpp /cpp-netlib//cppnetlib-constants
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-message-directives
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-message-wrappers
+ /cpp-netlib//cppnetlib-http-client
+ /cpp-netlib//cppnetlib-http-client-connections ;
+
+run server_constructor_test.cpp /cpp-netlib//cppnetlib-constants
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-server
+ /cpp-netlib//cppnetlib-http-server-parsers
+ /cpp-netlib//cppnetlib-utils-thread_pool ;
+
+run server_async_run_stop_concurrency.cpp /cpp-netlib//cppnetlib-constants
+ /cpp-netlib//cppnetlib-uri
+ /cpp-netlib//cppnetlib-message
+ /cpp-netlib//cppnetlib-message-wrappers
+ /cpp-netlib//cppnetlib-http-message
+ /cpp-netlib//cppnetlib-http-server
+ /cpp-netlib//cppnetlib-http-server-parsers
+ /cpp-netlib//cppnetlib-utils-thread_pool ;
+
+#run client_localhost_normal_test.cpp /cpp-netlib//cppnetlib-uri /cpp-netlib//cppnetlib-http-client-connections ;
+#run client_localhost_ssl_test.cpp /cpp-netlib//cppnetlib-uri /cpp-netlib//cppnetlib-http-client-connections ;
+#run message_async_ready_test.cpp ;
+#run message_test.cpp /cpp-netlib//cppnetlib-uri ;
+#run request_incremental_parser_test.cpp ;
+#run request_linearize_test.cpp /cpp-netlib//cppnetlib-uri ;
+#run response_incremental_parser_test.cpp /cpp-netlib//cppnetlib-http-server-parsers ;
+#run server_constructor_test.cpp /cpp-netlib//cppnetlib-http-server-parsers ;
#run server_include_inlined.cpp : <define>BOOST_NETWORK_NO_LIB ;
-exe http_async_server : server_async.cpp /cpp-netlib//cppnetlib-server-parsers ;
-exe hello_world : server_hello_world.cpp /cpp-netlib//cppnetlib-server-parsers ;
-exe http_async_less_copy_server : server_async_less_copy.cpp /cpp-netlib//cppnetlib-server-parsers ;
-exe http_async_run_stop_concurrency_server : server_async_run_stop_concurrency.cpp /cpp-netlib//cppnetlib-server-parsers ;
+#exe http_async_server : server_async.cpp /cpp-netlib//cppnetlib-http-server-parsers ;
+#exe hello_world : server_hello_world.cpp /cpp-netlib//cppnetlib-http-server-parsers ;
+#exe http_async_less_copy_server : server_async_less_copy.cpp /cpp-netlib//cppnetlib-http-server-parsers ;
+#exe http_async_run_stop_concurrency_server : server_async_run_stop_concurrency.cpp /cpp-netlib//cppnetlib-http-server-parsers ;
-make httplib_acceptance.passed : ../httplib_acceptance.py hello_world : @httplib_acceptance ;
-make httplib_async_acceptance.passed : ../httplib_acceptance.py http_async_server : @httplib_acceptance ;
-make httplib_async_less_copy_acceptance.passed : ../httplib_acceptance.py http_async_less_copy_server : @httplib_acceptance ;
-make httplib_async_run_stop_concurrency_acceptance.passed : ../httplib_acceptance.py http_async_run_stop_concurrency_server : @httplib_acceptance ;
+#make httplib_acceptance.passed : ../httplib_acceptance.py hello_world : @httplib_acceptance ;
+#make httplib_async_acceptance.passed : ../httplib_acceptance.py http_async_server : @httplib_acceptance ;
+#make httplib_async_less_copy_acceptance.passed : ../httplib_acceptance.py http_async_less_copy_server : @httplib_acceptance ;
+#make httplib_async_run_stop_concurrency_acceptance.passed : ../httplib_acceptance.py http_async_run_stop_concurrency_server : @httplib_acceptance ;
actions httplib_acceptance {
export TEST_SCRIPT=`echo "$(>)" | awk '{print $1}'`
@@ -46,4 +136,3 @@ actions httplib_acceptance {
export PORT=`echo "import random; print random.randint(8000, 8010)" | python`
python $TEST_SCRIPT $EXECUTABLE $PORT $(<)
}
-
View
10 libs/network/test/uri/Jamfile.v2
@@ -10,8 +10,12 @@ project network_test/uri :
requirements
<include>../../../../
<include>../
+ <toolset>gcc:<cxxflags>-std=c++0x
;
-run url_test.cpp /cpp-netlib//cppnetlib-uri ;
-run url_builder_test.cpp /cpp-netlib//cppnetlib-uri ;
-run url_encoding_test.cpp /cpp-netlib//cppnetlib-uri ;
+run uri_test.cpp /cpp-netlib//cppnetlib-uri ;
+run uri_builder_test.cpp /cpp-netlib//cppnetlib-uri ;
+run uri_builder_stream_test.cpp /cpp-netlib//cppnetlib-uri ;
+run uri_encoding_test.cpp /cpp-netlib//cppnetlib-uri ;
+run relative_uri_test.cpp /cpp-netlib//cppnetlib-uri ;
+run scheme_tests.cpp /cpp-netlib//cppnetlib-uri ;
Please sign in to comment.
Something went wrong with that request. Please try again.