build: Experimental support to build using precompiled headers
This type of build needs to be explicitly enabled using --with-pch
configure option.
Change-Id: I02dc304187d54c3cf40f1d51b1b11b21f868e225
diff --git a/src/security/certificate-cache-ttl.cpp b/src/security/certificate-cache-ttl.cpp
index f5482a3..9538d95 100644
--- a/src/security/certificate-cache-ttl.cpp
+++ b/src/security/certificate-cache-ttl.cpp
@@ -5,13 +5,12 @@
* See COPYING for copyright and distribution information.
*/
+#include "common.hpp"
+
#include "certificate-cache-ttl.hpp"
-#include <iostream>
-
#include "../util/logging.hpp"
-
INIT_LOGGER("CertificateCacheTtl")
using namespace std;
diff --git a/src/security/certificate-cache-ttl.hpp b/src/security/certificate-cache-ttl.hpp
index 6d5194b..8702c3a 100644
--- a/src/security/certificate-cache-ttl.hpp
+++ b/src/security/certificate-cache-ttl.hpp
@@ -8,15 +8,12 @@
#ifndef NDN_CERTIFICATE_CACHE_TTL_HPP
#define NDN_CERTIFICATE_CACHE_TTL_HPP
+#include "../common.hpp"
#include "certificate-cache.hpp"
#include "../util/scheduler.hpp"
#include "../util/time.hpp"
-#include <unistd.h>
-#include <map>
-
-namespace ndn
-{
+namespace ndn {
class CertificateCacheTtl : public CertificateCache
{
diff --git a/src/security/certificate-extension.cpp b/src/security/certificate-extension.cpp
index f876823..e3ceff6 100644
--- a/src/security/certificate-extension.cpp
+++ b/src/security/certificate-extension.cpp
@@ -6,7 +6,9 @@
* See COPYING for copyright and distribution information.
*/
-#include "security/certificate-extension.hpp"
+#include "common.hpp"
+
+#include "certificate-extension.hpp"
#include <cryptopp/asn.h>
using namespace std;
diff --git a/src/security/certificate-subject-description.cpp b/src/security/certificate-subject-description.cpp
index fc6156f..63e7b0b 100644
--- a/src/security/certificate-subject-description.cpp
+++ b/src/security/certificate-subject-description.cpp
@@ -6,7 +6,10 @@
* See COPYING for copyright and distribution information.
*/
-#include "security/certificate-subject-description.hpp"
+#include "common.hpp"
+
+#include "certificate-subject-description.hpp"
+
#include <cryptopp/asn.h>
using namespace std;
diff --git a/src/security/certificate.cpp b/src/security/certificate.cpp
index 3a3b224..3778a80 100644
--- a/src/security/certificate.cpp
+++ b/src/security/certificate.cpp
@@ -8,7 +8,7 @@
#include "common.hpp"
-#include "security/certificate.hpp"
+#include "certificate.hpp"
#include "../util/logging.hpp"
#include "../util/time.hpp"
diff --git a/src/security/certificate.hpp b/src/security/certificate.hpp
index 9871733..260638a 100644
--- a/src/security/certificate.hpp
+++ b/src/security/certificate.hpp
@@ -9,8 +9,8 @@
#ifndef NDN_CERTIFICATE_HPP
#define NDN_CERTIFICATE_HPP
-#include "../data.hpp"
#include "../common.hpp"
+#include "../data.hpp"
#include "certificate-subject-description.hpp"
#include "certificate-extension.hpp"
diff --git a/src/security/identity-certificate.cpp b/src/security/identity-certificate.cpp
index 334172e..44d6588 100644
--- a/src/security/identity-certificate.cpp
+++ b/src/security/identity-certificate.cpp
@@ -6,7 +6,9 @@
* See COPYING for copyright and distribution information.
*/
-#include "security/identity-certificate.hpp"
+#include "common.hpp"
+
+#include "identity-certificate.hpp"
using namespace std;
diff --git a/src/security/identity-certificate.hpp b/src/security/identity-certificate.hpp
index 65b07af..fa31966 100644
--- a/src/security/identity-certificate.hpp
+++ b/src/security/identity-certificate.hpp
@@ -9,6 +9,7 @@
#ifndef NDN_IDENTITY_CERTIFICATE_HPP
#define NDN_IDENTITY_CERTIFICATE_HPP
+#include "../common.hpp"
#include "certificate.hpp"
namespace ndn {
diff --git a/src/security/public-key.cpp b/src/security/public-key.cpp
index 27992ca..09222a4 100644
--- a/src/security/public-key.cpp
+++ b/src/security/public-key.cpp
@@ -7,7 +7,8 @@
*/
#include "common.hpp"
-#include "security/public-key.hpp"
+
+#include "public-key.hpp"
#include <cryptopp/rsa.h>
#include <cryptopp/base64.h>
diff --git a/src/security/public-key.hpp b/src/security/public-key.hpp
index 5a70e38..8fc5dab 100644
--- a/src/security/public-key.hpp
+++ b/src/security/public-key.hpp
@@ -9,7 +9,8 @@
#ifndef NDN_PUBLIC_KEY_HPP
#define NDN_PUBLIC_KEY_HPP
-#include <stdexcept>
+#include "../common.hpp"
+
#include "../encoding/oid.hpp"
#include "../encoding/buffer.hpp"
#include "security-common.hpp"
diff --git a/src/security/sec-public-info-memory.cpp b/src/security/sec-public-info-memory.cpp
index c6d7316..e9f93f2 100644
--- a/src/security/sec-public-info-memory.cpp
+++ b/src/security/sec-public-info-memory.cpp
@@ -5,10 +5,10 @@
* See COPYING for copyright and distribution information.
*/
-#include "security/sec-public-info-memory.hpp"
+#include "common.hpp"
-#include <algorithm>
-#include "security/identity-certificate.hpp"
+#include "sec-public-info-memory.hpp"
+#include "identity-certificate.hpp"
using namespace std;
diff --git a/src/security/sec-public-info-memory.hpp b/src/security/sec-public-info-memory.hpp
index eb747e9..e598ebf 100644
--- a/src/security/sec-public-info-memory.hpp
+++ b/src/security/sec-public-info-memory.hpp
@@ -8,8 +8,7 @@
#ifndef NDN_SEC_PUBLIC_INFO_MEMORY_HPP
#define NDN_SEC_PUBLIC_INFO_MEMORY_HPP
-#include <vector>
-#include <map>
+#include "../common.hpp"
#include "sec-public-info.hpp"
namespace ndn {
@@ -26,7 +25,7 @@
/**
* The virtual Destructor.
*/
- virtual
+ virtual
~SecPublicInfoMemory();
/**
@@ -34,7 +33,7 @@
* @param identityName The identity name.
* @return true if the identity exists, otherwise false.
*/
- virtual bool
+ virtual bool
doesIdentityExist(const Name& identityName);
/**
@@ -48,7 +47,7 @@
* Revoke the identity.
* @return true if the identity was revoked, false if not.
*/
- virtual bool
+ virtual bool
revokeIdentity();
/**
diff --git a/src/security/sec-public-info-sqlite3.cpp b/src/security/sec-public-info-sqlite3.cpp
index 43dc641..b2315c6 100644
--- a/src/security/sec-public-info-sqlite3.cpp
+++ b/src/security/sec-public-info-sqlite3.cpp
@@ -6,19 +6,24 @@
* See COPYING for copyright and distribution information.
*/
+#include "common.hpp"
+
+#include "sec-public-info-sqlite3.hpp"
+#include "identity-certificate.hpp"
+#include "signature-sha256-with-rsa.hpp"
+
+#include "../util/logging.hpp"
+#include "../util/time.hpp"
+
+#include "../data.hpp"
+
#include <sqlite3.h>
#include <stdio.h>
#include <stdlib.h>
#include <sstream>
#include <fstream>
#include <boost/filesystem.hpp>
-#include "../util/logging.hpp"
-#include "../util/time.hpp"
-#include "data.hpp"
-#include "security/identity-certificate.hpp"
-#include "security/sec-public-info-sqlite3.hpp"
-#include "security/signature-sha256-with-rsa.hpp"
INIT_LOGGER("BasicKeyMetaInfo");
diff --git a/src/security/sec-rule-relative.cpp b/src/security/sec-rule-relative.cpp
index 8da1bd1..cdfdeac 100644
--- a/src/security/sec-rule-relative.cpp
+++ b/src/security/sec-rule-relative.cpp
@@ -5,6 +5,8 @@
* See COPYING for copyright and distribution information.
*/
+#include "common.hpp"
+
#include "sec-rule-relative.hpp"
#include "signature-sha256-with-rsa.hpp"
diff --git a/src/security/sec-rule-specific.cpp b/src/security/sec-rule-specific.cpp
index 1479b6d..b1973de 100644
--- a/src/security/sec-rule-specific.cpp
+++ b/src/security/sec-rule-specific.cpp
@@ -5,6 +5,8 @@
* See COPYING for copyright and distribution information.
*/
+#include "common.hpp"
+
#include "sec-rule-specific.hpp"
#include "signature-sha256-with-rsa.hpp"
diff --git a/src/security/sec-rule-specific.hpp b/src/security/sec-rule-specific.hpp
index 21d00e6..2b7b355 100644
--- a/src/security/sec-rule-specific.hpp
+++ b/src/security/sec-rule-specific.hpp
@@ -8,6 +8,7 @@
#ifndef NDN_SEC_RULE_SPECIFIC_H
#define NDN_SEC_RULE_SPECIFIC_H
+#include "../common.hpp"
#include "sec-rule.hpp"
#include "../util/regex.hpp"
diff --git a/src/security/sec-rule.hpp b/src/security/sec-rule.hpp
index 1e2dbd0..c175863 100644
--- a/src/security/sec-rule.hpp
+++ b/src/security/sec-rule.hpp
@@ -8,6 +8,7 @@
#ifndef NDN_SEC_RULE_HPP
#define NDN_SEC_RULE_HPP
+#include "../common.hpp"
#include "../data.hpp"
namespace ndn
diff --git a/src/security/sec-tpm-file.cpp b/src/security/sec-tpm-file.cpp
index c8dab80..52f14ba 100644
--- a/src/security/sec-tpm-file.cpp
+++ b/src/security/sec-tpm-file.cpp
@@ -7,13 +7,9 @@
* See COPYING for copyright and distribution information.
*/
-#if __clang__
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
+#include "common.hpp"
-#include "security/sec-tpm-file.hpp"
-
-#include <string>
+#include "sec-tpm-file.hpp"
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
diff --git a/src/security/sec-tpm-memory.cpp b/src/security/sec-tpm-memory.cpp
index d4de6fc..a72e385 100644
--- a/src/security/sec-tpm-memory.cpp
+++ b/src/security/sec-tpm-memory.cpp
@@ -5,8 +5,11 @@
* See COPYING for copyright and distribution information.
*/
-#include "security/sec-tpm-memory.hpp"
-#include "security/public-key.hpp"
+#include "common.hpp"
+
+#include "sec-tpm-memory.hpp"
+#include "public-key.hpp"
+
#include <openssl/ssl.h>
#include <openssl/sha.h>
#include <openssl/rsa.h>
diff --git a/src/security/sec-tpm-memory.hpp b/src/security/sec-tpm-memory.hpp
index 110442e..38bc5ff 100644
--- a/src/security/sec-tpm-memory.hpp
+++ b/src/security/sec-tpm-memory.hpp
@@ -8,7 +8,7 @@
#ifndef NDN_SEC_TPM_MEMORY_HPP
#define NDN_SEC_TPM_MEMORY_HPP
-#include <map>
+#include "../common.hpp"
#include "sec-tpm.hpp"
struct rsa_st;
diff --git a/src/security/sec-tpm-osx.cpp b/src/security/sec-tpm-osx.cpp
index ba2464f..27039bf 100644
--- a/src/security/sec-tpm-osx.cpp
+++ b/src/security/sec-tpm-osx.cpp
@@ -5,13 +5,13 @@
* See COPYING for copyright and distribution information.
*/
+#include "common.hpp"
+
#include "sec-tpm-osx.hpp"
#include "security/public-key.hpp"
#include "util/logging.hpp"
-#include <fstream>
-#include <sstream>
#include <pwd.h>
#include <unistd.h>
#include <stdlib.h>
diff --git a/src/security/sec-tpm.hpp b/src/security/sec-tpm.hpp
index 3336a32..ec3334d 100644
--- a/src/security/sec-tpm.hpp
+++ b/src/security/sec-tpm.hpp
@@ -9,7 +9,7 @@
#ifndef NDN_SEC_TPM_HPP
#define NDN_SEC_TPM_HPP
-#include <string>
+#include "../common.hpp"
#include "security-common.hpp"
#include "../name.hpp"
#include "../data.hpp"
diff --git a/src/security/validator-regex.cpp b/src/security/validator-regex.cpp
index 63c49c4..18dc9bf 100644
--- a/src/security/validator-regex.cpp
+++ b/src/security/validator-regex.cpp
@@ -5,6 +5,8 @@
* See COPYING for copyright and distribution information.
*/
+#include "common.hpp"
+
#include "validator-regex.hpp"
#include "signature-sha256-with-rsa.hpp"
#include "certificate-cache-ttl.hpp"
diff --git a/src/security/validator-regex.hpp b/src/security/validator-regex.hpp
index a06964c..6b44d13 100644
--- a/src/security/validator-regex.hpp
+++ b/src/security/validator-regex.hpp
@@ -14,9 +14,6 @@
#include "certificate-cache.hpp"
#include "../util/regex.hpp"
-#include <map>
-
-
namespace ndn {
class ValidatorRegex : public Validator
diff --git a/src/security/validator.cpp b/src/security/validator.cpp
index 62289f5..ebb8b55 100644
--- a/src/security/validator.cpp
+++ b/src/security/validator.cpp
@@ -6,6 +6,8 @@
* See COPYING for copyright and distribution information.
*/
+#include "common.hpp"
+
#include "validator.hpp"
#include "../util/logging.hpp"
diff --git a/src/security/validator.hpp b/src/security/validator.hpp
index 4ba4c43..1d74aa2 100644
--- a/src/security/validator.hpp
+++ b/src/security/validator.hpp
@@ -9,6 +9,8 @@
#ifndef NDN_VALIDATOR_HPP
#define NDN_VALIDATOR_HPP
+#include "../common.hpp"
+
#include "../data.hpp"
#include "../face.hpp"
#include "public-key.hpp"