Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66174 - in trunk: boost/asio/impl libs/asio/doc
From: chris_at_[hidden]
Date: 2010-10-25 08:26:58


Author: chris_kohlhoff
Date: 2010-10-25 08:26:06 EDT (Mon, 25 Oct 2010)
New Revision: 66174
URL: http://svn.boost.org/trac/boost/changeset/66174

Log:
Rename separate compilation header. Refs #4560.

Added:
   trunk/boost/asio/impl/src.hpp (contents, props changed)
Text files modified:
   trunk/boost/asio/impl/src.cpp | 60 ++++++++-------------------------------
   trunk/libs/asio/doc/using.qbk | 9 ++++++
   2 files changed, 22 insertions(+), 47 deletions(-)

Modified: trunk/boost/asio/impl/src.cpp
==============================================================================
--- trunk/boost/asio/impl/src.cpp (original)
+++ trunk/boost/asio/impl/src.cpp 2010-10-25 08:26:06 EDT (Mon, 25 Oct 2010)
@@ -8,52 +8,18 @@
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
 
-#define BOOST_ASIO_SOURCE
-
-#include <boost/asio/detail/config.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# error Do not compile Asio library source with BOOST_ASIO_HEADER_ONLY defined
+#if defined(_MSC_VER) \
+ || defined(__BORLANDC__) \
+ || defined(__DMC__)
+# pragma message ( \
+ "This file is deprecated. " \
+ "Please #include <boost/asio/impl/src.hpp> instead.>)
+#elif defined(__GNUC__) \
+ || defined(__HP_aCC) \
+ || defined(__SUNPRO_CC) \
+ || defined(__IBMCPP__)
+# warning "This file is deprecated."
+# warning "Please #include <boost/asio/impl/src.hpp> instead.>
 #endif
 
-#include <boost/asio/impl/error.ipp>
-#include <boost/asio/impl/io_service.ipp>
-#include <boost/asio/impl/serial_port_base.ipp>
-#include <boost/asio/detail/impl/descriptor_ops.ipp>
-#include <boost/asio/detail/impl/dev_poll_reactor.ipp>
-#include <boost/asio/detail/impl/epoll_reactor.ipp>
-#include <boost/asio/detail/impl/eventfd_select_interrupter.ipp>
-#include <boost/asio/detail/impl/kqueue_reactor.ipp>
-#include <boost/asio/detail/impl/pipe_select_interrupter.ipp>
-#include <boost/asio/detail/impl/posix_event.ipp>
-#include <boost/asio/detail/impl/posix_mutex.ipp>
-#include <boost/asio/detail/impl/posix_thread.ipp>
-#include <boost/asio/detail/impl/posix_tss_ptr.ipp>
-#include <boost/asio/detail/impl/reactive_descriptor_service.ipp>
-#include <boost/asio/detail/impl/reactive_serial_port_service.ipp>
-#include <boost/asio/detail/impl/reactive_socket_service_base.ipp>
-#include <boost/asio/detail/impl/resolver_service_base.ipp>
-#include <boost/asio/detail/impl/select_reactor.ipp>
-#include <boost/asio/detail/impl/service_registry.ipp>
-#include <boost/asio/detail/impl/socket_ops.ipp>
-#include <boost/asio/detail/impl/socket_select_interrupter.ipp>
-#include <boost/asio/detail/impl/strand_service.ipp>
-#include <boost/asio/detail/impl/task_io_service.ipp>
-#include <boost/asio/detail/impl/throw_error.ipp>
-#include <boost/asio/detail/impl/timer_queue.ipp>
-#include <boost/asio/detail/impl/timer_queue_set.ipp>
-#include <boost/asio/detail/impl/win_iocp_handle_service.ipp>
-#include <boost/asio/detail/impl/win_iocp_io_service.ipp>
-#include <boost/asio/detail/impl/win_iocp_serial_port_service.ipp>
-#include <boost/asio/detail/impl/win_iocp_socket_service_base.ipp>
-#include <boost/asio/detail/impl/win_event.ipp>
-#include <boost/asio/detail/impl/win_mutex.ipp>
-#include <boost/asio/detail/impl/win_thread.ipp>
-#include <boost/asio/detail/impl/win_tss_ptr.ipp>
-#include <boost/asio/detail/impl/winsock_init.ipp>
-#include <boost/asio/ip/impl/address.ipp>
-#include <boost/asio/ip/impl/address_v4.ipp>
-#include <boost/asio/ip/impl/address_v6.ipp>
-#include <boost/asio/ip/impl/host_name.ipp>
-#include <boost/asio/ip/detail/impl/endpoint.ipp>
-#include <boost/asio/local/detail/impl/endpoint.ipp>
+#include <boost/asio/impl/src.hpp>

Added: trunk/boost/asio/impl/src.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/asio/impl/src.hpp 2010-10-25 08:26:06 EDT (Mon, 25 Oct 2010)
@@ -0,0 +1,64 @@
+//
+// impl/src.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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)
+//
+
+#ifndef BOOST_ASIO_IMPL_SRC_HPP
+#define BOOST_ASIO_IMPL_SRC_HPP
+
+#define BOOST_ASIO_SOURCE
+
+#include <boost/asio/detail/config.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# error Do not compile Asio library source with BOOST_ASIO_HEADER_ONLY defined
+#endif
+
+#include <boost/asio/impl/error.ipp>
+#include <boost/asio/impl/io_service.ipp>
+#include <boost/asio/impl/serial_port_base.ipp>
+#include <boost/asio/detail/impl/descriptor_ops.ipp>
+#include <boost/asio/detail/impl/dev_poll_reactor.ipp>
+#include <boost/asio/detail/impl/epoll_reactor.ipp>
+#include <boost/asio/detail/impl/eventfd_select_interrupter.ipp>
+#include <boost/asio/detail/impl/kqueue_reactor.ipp>
+#include <boost/asio/detail/impl/pipe_select_interrupter.ipp>
+#include <boost/asio/detail/impl/posix_event.ipp>
+#include <boost/asio/detail/impl/posix_mutex.ipp>
+#include <boost/asio/detail/impl/posix_thread.ipp>
+#include <boost/asio/detail/impl/posix_tss_ptr.ipp>
+#include <boost/asio/detail/impl/reactive_descriptor_service.ipp>
+#include <boost/asio/detail/impl/reactive_serial_port_service.ipp>
+#include <boost/asio/detail/impl/reactive_socket_service_base.ipp>
+#include <boost/asio/detail/impl/resolver_service_base.ipp>
+#include <boost/asio/detail/impl/select_reactor.ipp>
+#include <boost/asio/detail/impl/service_registry.ipp>
+#include <boost/asio/detail/impl/socket_ops.ipp>
+#include <boost/asio/detail/impl/socket_select_interrupter.ipp>
+#include <boost/asio/detail/impl/strand_service.ipp>
+#include <boost/asio/detail/impl/task_io_service.ipp>
+#include <boost/asio/detail/impl/throw_error.ipp>
+#include <boost/asio/detail/impl/timer_queue.ipp>
+#include <boost/asio/detail/impl/timer_queue_set.ipp>
+#include <boost/asio/detail/impl/win_iocp_handle_service.ipp>
+#include <boost/asio/detail/impl/win_iocp_io_service.ipp>
+#include <boost/asio/detail/impl/win_iocp_serial_port_service.ipp>
+#include <boost/asio/detail/impl/win_iocp_socket_service_base.ipp>
+#include <boost/asio/detail/impl/win_event.ipp>
+#include <boost/asio/detail/impl/win_mutex.ipp>
+#include <boost/asio/detail/impl/win_thread.ipp>
+#include <boost/asio/detail/impl/win_tss_ptr.ipp>
+#include <boost/asio/detail/impl/winsock_init.ipp>
+#include <boost/asio/ip/impl/address.ipp>
+#include <boost/asio/ip/impl/address_v4.ipp>
+#include <boost/asio/ip/impl/address_v6.ipp>
+#include <boost/asio/ip/impl/host_name.ipp>
+#include <boost/asio/ip/detail/impl/endpoint.ipp>
+#include <boost/asio/local/detail/impl/endpoint.ipp>
+
+#endif // BOOST_ASIO_IMPL_SRC_HPP

Modified: trunk/libs/asio/doc/using.qbk
==============================================================================
--- trunk/libs/asio/doc/using.qbk (original)
+++ trunk/libs/asio/doc/using.qbk 2010-10-25 08:26:06 EDT (Mon, 25 Oct 2010)
@@ -130,6 +130,15 @@
 
 ]
 
+[heading Optional separate compilation]
+
+By default, Boost.Asio is a header-only library. However, some developers may
+prefer to build Boost.Asio using separately compiled source code. To do this,
+add `#include <boost/asio/impl/src.hpp>` to one (and only one) source file in a
+program, then build the program with `BOOST_ASIO_SEPARATE_COMPILATION` defined
+in the project\/compiler settings. Alternatively, `BOOST_ASIO_DYN_LINK` may be
+defined to build a separately-compiled Boost.Asio as part of a shared library.
+
 [heading Macros]
 
 The macros listed in the table below may be used to control the behaviour of


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk