build: make precompiled headers more useful
This can reduce the compilation time of a release
build (without tests) by more than 40%
Refs: #5212
Change-Id: I977aff0c0c7becbfee8a8b55605b81d0c014829b
diff --git a/daemon/face/ethernet-channel.hpp b/daemon/face/ethernet-channel.hpp
index 2096585..bc9b141 100644
--- a/daemon/face/ethernet-channel.hpp
+++ b/daemon/face/ethernet-channel.hpp
@@ -30,6 +30,7 @@
#include "ethernet-protocol.hpp"
#include "pcap-helper.hpp"
+#include <boost/asio/posix/stream_descriptor.hpp>
#include <ndn-cxx/net/network-interface.hpp>
namespace nfd::face {
diff --git a/daemon/face/ethernet-transport.hpp b/daemon/face/ethernet-transport.hpp
index 951d56a..8fa7a6a 100644
--- a/daemon/face/ethernet-transport.hpp
+++ b/daemon/face/ethernet-transport.hpp
@@ -30,6 +30,7 @@
#include "pcap-helper.hpp"
#include "transport.hpp"
+#include <boost/asio/posix/stream_descriptor.hpp>
#include <ndn-cxx/net/network-interface.hpp>
namespace nfd::face {
diff --git a/daemon/face/multicast-udp-transport.cpp b/daemon/face/multicast-udp-transport.cpp
index bb373fd..e0b7ac5 100644
--- a/daemon/face/multicast-udp-transport.cpp
+++ b/daemon/face/multicast-udp-transport.cpp
@@ -29,6 +29,8 @@
#include "common/privilege-helper.hpp"
+#include <boost/asio/ip/multicast.hpp>
+#include <boost/asio/ip/v6_only.hpp>
#include <boost/functional/hash.hpp>
#ifdef __linux__
diff --git a/daemon/face/multicast-udp-transport.hpp b/daemon/face/multicast-udp-transport.hpp
index b881e81..5a19a0c 100644
--- a/daemon/face/multicast-udp-transport.hpp
+++ b/daemon/face/multicast-udp-transport.hpp
@@ -28,6 +28,7 @@
#include "datagram-transport.hpp"
+#include <boost/asio/ip/udp.hpp>
#include <ndn-cxx/net/network-interface.hpp>
namespace nfd::face {
diff --git a/daemon/face/network-predicate.cpp b/daemon/face/network-predicate.cpp
index a13d886..340ef82 100644
--- a/daemon/face/network-predicate.cpp
+++ b/daemon/face/network-predicate.cpp
@@ -29,6 +29,8 @@
#include <fnmatch.h>
+#include <boost/lexical_cast.hpp>
+
namespace nfd::face {
NetworkPredicateBase::NetworkPredicateBase()
diff --git a/daemon/face/network-predicate.hpp b/daemon/face/network-predicate.hpp
index 2ea79d6..5a758da 100644
--- a/daemon/face/network-predicate.hpp
+++ b/daemon/face/network-predicate.hpp
@@ -28,6 +28,7 @@
#include "core/common.hpp"
+#include <boost/property_tree/ptree_fwd.hpp>
#include <ndn-cxx/net/network-interface.hpp>
namespace nfd::face {
diff --git a/daemon/face/stream-transport.hpp b/daemon/face/stream-transport.hpp
index ec33b26..b6ad18b 100644
--- a/daemon/face/stream-transport.hpp
+++ b/daemon/face/stream-transport.hpp
@@ -32,6 +32,8 @@
#include <queue>
+#include <boost/asio/write.hpp>
+
namespace nfd::face {
/** \brief Implements Transport for stream-based protocols.
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index be029d0..e3c9910 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -29,6 +29,8 @@
#include "tcp-transport.hpp"
#include "common/global.hpp"
+#include <boost/asio/ip/v6_only.hpp>
+
namespace nfd::face {
NFD_LOG_INIT(TcpChannel);
diff --git a/daemon/face/tcp-channel.hpp b/daemon/face/tcp-channel.hpp
index 7193851..811ee5e 100644
--- a/daemon/face/tcp-channel.hpp
+++ b/daemon/face/tcp-channel.hpp
@@ -28,6 +28,8 @@
#include "channel.hpp"
+#include <boost/asio/ip/tcp.hpp>
+
namespace nfd::tcp {
using Endpoint = boost::asio::ip::tcp::endpoint;
} // namespace nfd::tcp
diff --git a/daemon/face/tcp-factory.cpp b/daemon/face/tcp-factory.cpp
index 8ff04cc..1d25419 100644
--- a/daemon/face/tcp-factory.cpp
+++ b/daemon/face/tcp-factory.cpp
@@ -25,6 +25,8 @@
#include "tcp-factory.hpp"
+#include <boost/lexical_cast.hpp>
+
namespace nfd::face {
namespace ip = boost::asio::ip;
diff --git a/daemon/face/tcp-transport.hpp b/daemon/face/tcp-transport.hpp
index 595e574..ed147fe 100644
--- a/daemon/face/tcp-transport.hpp
+++ b/daemon/face/tcp-transport.hpp
@@ -28,6 +28,8 @@
#include "stream-transport.hpp"
+#include <boost/asio/ip/tcp.hpp>
+
namespace nfd::face {
NFD_LOG_MEMBER_DECL_SPECIALIZED(StreamTransport<boost::asio::ip::tcp>);
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index 4e91045..80c6878 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -29,6 +29,8 @@
#include "unicast-udp-transport.hpp"
#include "common/global.hpp"
+#include <boost/asio/ip/v6_only.hpp>
+
namespace nfd::face {
NFD_LOG_INIT(UdpChannel);
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index 4feec76..331174d 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -28,6 +28,7 @@
#include "multicast-udp-transport.hpp"
#include "common/global.hpp"
+#include <boost/lexical_cast.hpp>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/copy.hpp>
diff --git a/daemon/face/udp-protocol.hpp b/daemon/face/udp-protocol.hpp
index ebd3dad..1b6e363 100644
--- a/daemon/face/udp-protocol.hpp
+++ b/daemon/face/udp-protocol.hpp
@@ -28,9 +28,11 @@
#include "core/common.hpp"
+#include <boost/asio/ip/udp.hpp>
+
namespace nfd::udp {
-typedef boost::asio::ip::udp::endpoint Endpoint;
+using Endpoint = boost::asio::ip::udp::endpoint;
/** \brief computes maximum payload size in a UDP packet
*/
diff --git a/daemon/face/unicast-udp-transport.hpp b/daemon/face/unicast-udp-transport.hpp
index 7c96fef..82982fc 100644
--- a/daemon/face/unicast-udp-transport.hpp
+++ b/daemon/face/unicast-udp-transport.hpp
@@ -28,6 +28,8 @@
#include "datagram-transport.hpp"
+#include <boost/asio/ip/udp.hpp>
+
namespace nfd::face {
NFD_LOG_MEMBER_DECL_SPECIALIZED((DatagramTransport<boost::asio::ip::udp, Unicast>));
diff --git a/daemon/face/unix-stream-channel.hpp b/daemon/face/unix-stream-channel.hpp
index 0c2eb2e..b0fdf2c 100644
--- a/daemon/face/unix-stream-channel.hpp
+++ b/daemon/face/unix-stream-channel.hpp
@@ -28,6 +28,8 @@
#include "channel.hpp"
+#include <boost/asio/local/stream_protocol.hpp>
+
namespace nfd::unix_stream {
using Endpoint = boost::asio::local::stream_protocol::endpoint;
} // namespace nfd::unix_stream
diff --git a/daemon/face/unix-stream-transport.hpp b/daemon/face/unix-stream-transport.hpp
index 8ad8a46..47b6a7e 100644
--- a/daemon/face/unix-stream-transport.hpp
+++ b/daemon/face/unix-stream-transport.hpp
@@ -28,6 +28,8 @@
#include "stream-transport.hpp"
+#include <boost/asio/local/stream_protocol.hpp>
+
#ifndef NFD_HAVE_UNIX_SOCKETS
#error "Cannot include this file when UNIX sockets are not available"
#endif