Skip to content

Commit 5813baa

Browse files
committed
CMake: Add install step for headers
As a requirement, all headers are moved to a new include/ path.
1 parent e8255aa commit 5813baa

File tree

407 files changed

+957
-955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

407 files changed

+957
-955
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ endif()
110110

111111
include_directories(
112112
# project includes
113-
${PROJECT_SOURCE_DIR}/core
113+
${PROJECT_SOURCE_DIR}/include
114114
)
115115

116116
if (BUILD_INTERNAL_DEPS)

cmake/install.cmake

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ function (filecoin_install targets)
1616
)
1717
endfunction()
1818

19+
install(
20+
DIRECTORY ${CMAKE_SOURCE_DIR}/include/filecoin
21+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
22+
)
23+
1924
install(
2025
EXPORT filecoinConfig
2126
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/filecoin

core/adt/impl/array.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "adt/array.hpp"
6+
#include "filecoin/adt/array.hpp"
77

88
namespace fc::adt {
99

core/adt/impl/balance_table_hamt.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "adt/balance_table_hamt.hpp"
7-
#include "primitives/address/address_codec.hpp"
6+
#include "filecoin/adt/balance_table_hamt.hpp"
7+
#include "filecoin/primitives/address/address_codec.hpp"
88

99
using fc::adt::BalanceTableHamt;
1010
using fc::adt::TokenAmount;

core/adt/impl/multimap.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "adt/multimap.hpp"
6+
#include "filecoin/adt/multimap.hpp"
77

8-
#include "adt/array.hpp"
8+
#include "filecoin/adt/array.hpp"
99

1010
namespace fc::adt {
1111

core/blockchain/impl/block_validator_impl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "blockchain/impl/block_validator_impl.hpp"
6+
#include "filecoin/blockchain/impl/block_validator_impl.hpp"
77

88
namespace fc::blockchain::block_validator {
99
// TODO (yuraz): FIL-87 implement proper validation

core/blockchain/impl/weight_calculator_impl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "blockchain/impl/weight_calculator_impl.hpp"
6+
#include "filecoin/blockchain/impl/weight_calculator_impl.hpp"
77

88
namespace fc::blockchain::weight {
99
using primitives::BigInt;

core/blockchain/message_pool/impl/gas_price_scored_message_storage.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "blockchain/message_pool/impl/gas_price_scored_message_storage.hpp"
6+
#include "filecoin/blockchain/message_pool/impl/gas_price_scored_message_storage.hpp"
77

8-
#include "blockchain/message_pool/message_pool_error.hpp"
8+
#include "filecoin/blockchain/message_pool/message_pool_error.hpp"
99

1010
using fc::blockchain::message_pool::GasPriceScoredMessageStorage;
1111
using fc::blockchain::message_pool::MessagePoolError;

core/blockchain/message_pool/impl/message_pool_error.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "blockchain/message_pool/message_pool_error.hpp"
6+
#include "filecoin/blockchain/message_pool/message_pool_error.hpp"
77

88
OUTCOME_CPP_DEFINE_CATEGORY(fc::blockchain::message_pool, MessagePoolError, e) {
99
using fc::blockchain::message_pool::MessagePoolError;

core/blockchain/production/impl/block_producer_impl.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "blockchain/production/impl/block_producer_impl.hpp"
6+
#include "filecoin/blockchain/production/impl/block_producer_impl.hpp"
77

88
#include <vector>
99

1010
#include <gsl/span>
11-
#include "clock/chain_epoch_clock.hpp"
12-
#include "codec/cbor/cbor.hpp"
13-
#include "common/visitor.hpp"
14-
#include "primitives/cid/cid_of_cbor.hpp"
15-
#include "storage/amt/amt.hpp"
16-
#include "storage/ipfs/impl/in_memory_datastore.hpp"
11+
#include "filecoin/clock/chain_epoch_clock.hpp"
12+
#include "filecoin/codec/cbor/cbor.hpp"
13+
#include "filecoin/common/visitor.hpp"
14+
#include "filecoin/primitives/cid/cid_of_cbor.hpp"
15+
#include "filecoin/storage/amt/amt.hpp"
16+
#include "filecoin/storage/ipfs/impl/in_memory_datastore.hpp"
1717

1818
namespace fc::blockchain::production {
1919
using clock::Time;

core/clock/chain_epoch_clock.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "clock/chain_epoch_clock.hpp"
6+
#include "filecoin/clock/chain_epoch_clock.hpp"
77

88
OUTCOME_CPP_DEFINE_CATEGORY(fc::clock, EpochAtTimeError, e) {
99
using fc::clock::EpochAtTimeError;

core/clock/impl/chain_epoch_clock_impl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "clock/impl/chain_epoch_clock_impl.hpp"
6+
#include "filecoin/clock/impl/chain_epoch_clock_impl.hpp"
77

88
namespace fc::clock {
99
ChainEpochClockImpl::ChainEpochClockImpl(const Time &genesis_time)

core/clock/impl/utc_clock_impl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "clock/impl/utc_clock_impl.hpp"
6+
#include "filecoin/clock/impl/utc_clock_impl.hpp"
77

88
namespace fc::clock {
99
// TODO(turuslan): add NTP sync if necessary

core/clock/time.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "clock/time.hpp"
6+
#include "filecoin/clock/time.hpp"
77

88
#include <boost/date_time/posix_time/posix_time.hpp>
99

core/codec/cbor/cbor_decode_stream.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "codec/cbor/cbor_decode_stream.hpp"
6+
#include "filecoin/codec/cbor/cbor_decode_stream.hpp"
77

88
namespace fc::codec::cbor {
99
CborDecodeStream::CborDecodeStream(gsl::span<const uint8_t> data)

core/codec/cbor/cbor_encode_stream.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "codec/cbor/cbor_encode_stream.hpp"
6+
#include "filecoin/codec/cbor/cbor_encode_stream.hpp"
77

88
namespace fc::codec::cbor {
99
CborEncodeStream &CborEncodeStream::operator<<(

core/codec/cbor/cbor_errors.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "codec/cbor/cbor_errors.hpp"
6+
#include "filecoin/codec/cbor/cbor_errors.hpp"
77

88
OUTCOME_CPP_DEFINE_CATEGORY(fc::codec::cbor, CborEncodeError, e) {
99
using fc::codec::cbor::CborEncodeError;

core/codec/cbor/cbor_resolve.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "codec/cbor/cbor_resolve.hpp"
6+
#include "filecoin/codec/cbor/cbor_resolve.hpp"
77

88
OUTCOME_CPP_DEFINE_CATEGORY(fc::codec::cbor, CborResolveError, e) {
99
using fc::codec::cbor::CborResolveError;

core/codec/rle/rle_plus_encoding_stream.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "codec/rle/rle_plus_encoding_stream.hpp"
6+
#include "filecoin/codec/rle/rle_plus_encoding_stream.hpp"
77

88
namespace fc::codec::rle {
99
void RLEPlusEncodingStream::initContent() {

core/codec/rle/rle_plus_errors.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "codec/rle/rle_plus_errors.hpp"
6+
#include "filecoin/codec/rle/rle_plus_errors.hpp"
77

88
OUTCOME_CPP_DEFINE_CATEGORY(fc::codec::rle, RLEPlusDecodeError, e) {
99
using fc::codec::rle::RLEPlusDecodeError;

core/common/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#
55

66
filecoin_add_library(filecoin_hexutil
7-
hexutil.hpp
87
hexutil.cpp
98
)
109
target_link_libraries(filecoin_hexutil
@@ -13,7 +12,6 @@ target_link_libraries(filecoin_hexutil
1312
)
1413

1514
filecoin_add_library(filecoin_blob
16-
blob.hpp
1715
blob.cpp
1816
)
1917
target_link_libraries(filecoin_blob
@@ -27,7 +25,6 @@ target_link_libraries(filecoin_outcome INTERFACE
2725
)
2826

2927
filecoin_add_library(filecoin_buffer
30-
buffer.hpp
3128
buffer.cpp
3229
buffer_back_insert_iterator.cpp
3330
)

core/common/blob.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "common/blob.hpp"
6+
#include "filecoin/common/blob.hpp"
77

88
OUTCOME_CPP_DEFINE_CATEGORY(fc::common, BlobError, e) {
99
using fc::common::BlobError;

core/common/buffer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "common/buffer.hpp"
6+
#include "filecoin/common/buffer.hpp"
77

8-
#include "common/hexutil.hpp"
8+
#include "filecoin/common/hexutil.hpp"
99

1010
namespace fc::common {
1111

core/common/buffer_back_insert_iterator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "common/buffer.hpp"
6+
#include "filecoin/common/buffer.hpp"
77

88
using fc::common::Buffer;
99

core/common/hexutil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "common/hexutil.hpp"
6+
#include "filecoin/common/hexutil.hpp"
77

88
#include <boost/algorithm/hex.hpp>
99
#include <boost/format.hpp>

core/common/logger.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "common/logger.hpp"
6+
#include "filecoin/common/logger.hpp"
77

88
#include <spdlog/sinks/stdout_color_sinks.h>
99

core/crypto/blake2/blake2b.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// blake2b.c
77
// A simple BLAKE2b Reference Implementation.
88

9-
#include "blake2b.h"
9+
#include "filecoin/crypto/blake2/blake2b.h"
1010

1111
// Cyclic right rotation.
1212

core/crypto/blake2/blake2b160.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "crypto/blake2/blake2b160.hpp"
6+
#include "filecoin/crypto/blake2/blake2b160.hpp"
77

88
#include <iostream>
9-
#include "crypto/blake2/blake2b.h"
9+
#include "filecoin/crypto/blake2/blake2b.h"
1010

1111
namespace fc::crypto::blake2b {
1212

core/crypto/blake2/blake2s.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// blake2s.c
77
// A simple blake2s Reference Implementation.
88

9-
#include "blake2s.h"
9+
#include "filecoin/crypto/blake2/blake2s.h"
1010

1111
#include <stdint.h>
1212

@@ -210,4 +210,4 @@ void blake2s_256_init(blake2s_ctx *ctx_opaque) {
210210

211211
void blake2s_256(void *out, const void *in, size_t inlen) {
212212
blake2s(out, _256_bits, NULL, 0, in, inlen);
213-
}
213+
}

core/crypto/bls/impl/bls_provider_impl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "crypto/bls/impl/bls_provider_impl.hpp"
6+
#include "filecoin/crypto/bls/impl/bls_provider_impl.hpp"
77

88
#include <gsl/gsl_util>
99

core/crypto/hasher/hasher.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "hasher.hpp"
6+
#include "filecoin/crypto/hasher/hasher.hpp"
77

88
#include <libp2p/crypto/sha/sha256.hpp>
9-
#include "crypto/blake2/blake2b160.hpp"
9+
#include "filecoin/crypto/blake2/blake2b160.hpp"
1010

1111
namespace fc::crypto {
1212
std::map<Hasher::HashType, Hasher::HashMethod> Hasher::methods_{

core/crypto/murmur/murmur.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "crypto/murmur/murmur.hpp"
6+
#include "filecoin/crypto/murmur/murmur.hpp"
77

8-
#include <common/buffer.hpp>
8+
#include "filecoin/common/buffer.hpp"
99

1010
namespace fc::crypto::murmur {
1111
uint64_t getUint64LE(gsl::span<const uint8_t> bytes) {

core/crypto/randomness/impl/chain_randomness_provider_impl.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "crypto/randomness/impl/chain_randomness_provider_impl.hpp"
6+
#include "filecoin/crypto/randomness/impl/chain_randomness_provider_impl.hpp"
77

88
#include <boost/assert.hpp>
99
#include <libp2p/crypto/sha/sha256.hpp>
10-
#include "common/le_encoder.hpp"
11-
#include "primitives/ticket/ticket.hpp"
12-
#include "primitives/tipset/tipset_key.hpp"
13-
#include "storage/chain/chain_store.hpp"
10+
#include "filecoin/common/le_encoder.hpp"
11+
#include "filecoin/primitives/ticket/ticket.hpp"
12+
#include "filecoin/primitives/tipset/tipset_key.hpp"
13+
#include "filecoin/storage/chain/chain_store.hpp"
1414

1515
namespace fc::crypto::randomness {
1616

core/crypto/randomness/impl/randomness_provider_impl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "crypto/randomness/impl/randomness_provider_impl.hpp"
6+
#include "filecoin/crypto/randomness/impl/randomness_provider_impl.hpp"
77

88
#include <libp2p/crypto/sha/sha256.hpp>
9-
#include "common/le_encoder.hpp"
9+
#include "filecoin/common/le_encoder.hpp"
1010

1111
namespace fc::crypto::randomness {
1212

core/crypto/signature/signature.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "crypto/signature/signature.hpp"
6+
#include "filecoin/crypto/signature/signature.hpp"
77

88
OUTCOME_CPP_DEFINE_CATEGORY(fc::crypto::signature, SignatureError, e) {
99
using fc::crypto::signature::SignatureError;

0 commit comments

Comments
 (0)