Skip to content

Commit

Permalink
CMake: Add install step for headers
Browse files Browse the repository at this point in the history
As a requirement, all headers are moved to a new include/ path.
  • Loading branch information
eigendude authored and garbear committed Mar 9, 2020
1 parent 7805604 commit bdf013a
Show file tree
Hide file tree
Showing 407 changed files with 957 additions and 955 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ endif()

include_directories(
# project includes
${PROJECT_SOURCE_DIR}/core
${PROJECT_SOURCE_DIR}/include
)

if (BUILD_INTERNAL_DEPS)
Expand Down
5 changes: 5 additions & 0 deletions cmake/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ function (filecoin_install targets)
)
endfunction()

install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/filecoin
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(
EXPORT filecoinConfig
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/filecoin
Expand Down
2 changes: 1 addition & 1 deletion core/adt/impl/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "adt/array.hpp"
#include "filecoin/adt/array.hpp"

namespace fc::adt {

Expand Down
4 changes: 2 additions & 2 deletions core/adt/impl/balance_table_hamt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "adt/balance_table_hamt.hpp"
#include "primitives/address/address_codec.hpp"
#include "filecoin/adt/balance_table_hamt.hpp"
#include "filecoin/primitives/address/address_codec.hpp"

using fc::adt::BalanceTableHamt;
using fc::adt::TokenAmount;
Expand Down
4 changes: 2 additions & 2 deletions core/adt/impl/multimap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "adt/multimap.hpp"
#include "filecoin/adt/multimap.hpp"

#include "adt/array.hpp"
#include "filecoin/adt/array.hpp"

namespace fc::adt {

Expand Down
2 changes: 1 addition & 1 deletion core/blockchain/impl/block_validator_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "blockchain/impl/block_validator_impl.hpp"
#include "filecoin/blockchain/impl/block_validator_impl.hpp"

namespace fc::blockchain::block_validator {
// TODO (yuraz): FIL-87 implement proper validation
Expand Down
2 changes: 1 addition & 1 deletion core/blockchain/impl/weight_calculator_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "blockchain/impl/weight_calculator_impl.hpp"
#include "filecoin/blockchain/impl/weight_calculator_impl.hpp"

namespace fc::blockchain::weight {
using primitives::BigInt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "blockchain/message_pool/impl/gas_price_scored_message_storage.hpp"
#include "filecoin/blockchain/message_pool/impl/gas_price_scored_message_storage.hpp"

#include "blockchain/message_pool/message_pool_error.hpp"
#include "filecoin/blockchain/message_pool/message_pool_error.hpp"

using fc::blockchain::message_pool::GasPriceScoredMessageStorage;
using fc::blockchain::message_pool::MessagePoolError;
Expand Down
2 changes: 1 addition & 1 deletion core/blockchain/message_pool/impl/message_pool_error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "blockchain/message_pool/message_pool_error.hpp"
#include "filecoin/blockchain/message_pool/message_pool_error.hpp"

OUTCOME_CPP_DEFINE_CATEGORY(fc::blockchain::message_pool, MessagePoolError, e) {
using fc::blockchain::message_pool::MessagePoolError;
Expand Down
14 changes: 7 additions & 7 deletions core/blockchain/production/impl/block_producer_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "blockchain/production/impl/block_producer_impl.hpp"
#include "filecoin/blockchain/production/impl/block_producer_impl.hpp"

#include <vector>

#include <gsl/span>
#include "clock/chain_epoch_clock.hpp"
#include "codec/cbor/cbor.hpp"
#include "common/visitor.hpp"
#include "primitives/cid/cid_of_cbor.hpp"
#include "storage/amt/amt.hpp"
#include "storage/ipfs/impl/in_memory_datastore.hpp"
#include "filecoin/clock/chain_epoch_clock.hpp"
#include "filecoin/codec/cbor/cbor.hpp"
#include "filecoin/common/visitor.hpp"
#include "filecoin/primitives/cid/cid_of_cbor.hpp"
#include "filecoin/storage/amt/amt.hpp"
#include "filecoin/storage/ipfs/impl/in_memory_datastore.hpp"

namespace fc::blockchain::production {
using clock::Time;
Expand Down
2 changes: 1 addition & 1 deletion core/clock/chain_epoch_clock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "clock/chain_epoch_clock.hpp"
#include "filecoin/clock/chain_epoch_clock.hpp"

OUTCOME_CPP_DEFINE_CATEGORY(fc::clock, EpochAtTimeError, e) {
using fc::clock::EpochAtTimeError;
Expand Down
2 changes: 1 addition & 1 deletion core/clock/impl/chain_epoch_clock_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "clock/impl/chain_epoch_clock_impl.hpp"
#include "filecoin/clock/impl/chain_epoch_clock_impl.hpp"

namespace fc::clock {
ChainEpochClockImpl::ChainEpochClockImpl(const Time &genesis_time)
Expand Down
2 changes: 1 addition & 1 deletion core/clock/impl/utc_clock_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "clock/impl/utc_clock_impl.hpp"
#include "filecoin/clock/impl/utc_clock_impl.hpp"

namespace fc::clock {
// TODO(turuslan): add NTP sync if necessary
Expand Down
2 changes: 1 addition & 1 deletion core/clock/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "clock/time.hpp"
#include "filecoin/clock/time.hpp"

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

Expand Down
2 changes: 1 addition & 1 deletion core/codec/cbor/cbor_decode_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "codec/cbor/cbor_decode_stream.hpp"
#include "filecoin/codec/cbor/cbor_decode_stream.hpp"

namespace fc::codec::cbor {
CborDecodeStream::CborDecodeStream(gsl::span<const uint8_t> data)
Expand Down
2 changes: 1 addition & 1 deletion core/codec/cbor/cbor_encode_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "codec/cbor/cbor_encode_stream.hpp"
#include "filecoin/codec/cbor/cbor_encode_stream.hpp"

namespace fc::codec::cbor {
CborEncodeStream &CborEncodeStream::operator<<(
Expand Down
2 changes: 1 addition & 1 deletion core/codec/cbor/cbor_errors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "codec/cbor/cbor_errors.hpp"
#include "filecoin/codec/cbor/cbor_errors.hpp"

OUTCOME_CPP_DEFINE_CATEGORY(fc::codec::cbor, CborEncodeError, e) {
using fc::codec::cbor::CborEncodeError;
Expand Down
2 changes: 1 addition & 1 deletion core/codec/cbor/cbor_resolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "codec/cbor/cbor_resolve.hpp"
#include "filecoin/codec/cbor/cbor_resolve.hpp"

OUTCOME_CPP_DEFINE_CATEGORY(fc::codec::cbor, CborResolveError, e) {
using fc::codec::cbor::CborResolveError;
Expand Down
2 changes: 1 addition & 1 deletion core/codec/rle/rle_plus_encoding_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "codec/rle/rle_plus_encoding_stream.hpp"
#include "filecoin/codec/rle/rle_plus_encoding_stream.hpp"

namespace fc::codec::rle {
void RLEPlusEncodingStream::initContent() {
Expand Down
2 changes: 1 addition & 1 deletion core/codec/rle/rle_plus_errors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "codec/rle/rle_plus_errors.hpp"
#include "filecoin/codec/rle/rle_plus_errors.hpp"

OUTCOME_CPP_DEFINE_CATEGORY(fc::codec::rle, RLEPlusDecodeError, e) {
using fc::codec::rle::RLEPlusDecodeError;
Expand Down
3 changes: 0 additions & 3 deletions core/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#

filecoin_add_library(filecoin_hexutil
hexutil.hpp
hexutil.cpp
)
target_link_libraries(filecoin_hexutil
Expand All @@ -13,7 +12,6 @@ target_link_libraries(filecoin_hexutil
)

filecoin_add_library(filecoin_blob
blob.hpp
blob.cpp
)
target_link_libraries(filecoin_blob
Expand All @@ -27,7 +25,6 @@ target_link_libraries(filecoin_outcome INTERFACE
)

filecoin_add_library(filecoin_buffer
buffer.hpp
buffer.cpp
buffer_back_insert_iterator.cpp
)
Expand Down
2 changes: 1 addition & 1 deletion core/common/blob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "common/blob.hpp"
#include "filecoin/common/blob.hpp"

OUTCOME_CPP_DEFINE_CATEGORY(fc::common, BlobError, e) {
using fc::common::BlobError;
Expand Down
4 changes: 2 additions & 2 deletions core/common/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "common/buffer.hpp"
#include "filecoin/common/buffer.hpp"

#include "common/hexutil.hpp"
#include "filecoin/common/hexutil.hpp"

namespace fc::common {

Expand Down
2 changes: 1 addition & 1 deletion core/common/buffer_back_insert_iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "common/buffer.hpp"
#include "filecoin/common/buffer.hpp"

using fc::common::Buffer;

Expand Down
2 changes: 1 addition & 1 deletion core/common/hexutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "common/hexutil.hpp"
#include "filecoin/common/hexutil.hpp"

#include <boost/algorithm/hex.hpp>
#include <boost/format.hpp>
Expand Down
2 changes: 1 addition & 1 deletion core/common/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "common/logger.hpp"
#include "filecoin/common/logger.hpp"

#include <spdlog/sinks/stdout_color_sinks.h>

Expand Down
2 changes: 1 addition & 1 deletion core/crypto/blake2/blake2b.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// blake2b.c
// A simple BLAKE2b Reference Implementation.

#include "blake2b.h"
#include "filecoin/crypto/blake2/blake2b.h"

// Cyclic right rotation.

Expand Down
4 changes: 2 additions & 2 deletions core/crypto/blake2/blake2b160.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "crypto/blake2/blake2b160.hpp"
#include "filecoin/crypto/blake2/blake2b160.hpp"

#include <iostream>
#include "crypto/blake2/blake2b.h"
#include "filecoin/crypto/blake2/blake2b.h"

namespace fc::crypto::blake2b {

Expand Down
4 changes: 2 additions & 2 deletions core/crypto/blake2/blake2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// blake2s.c
// A simple blake2s Reference Implementation.

#include "blake2s.h"
#include "filecoin/crypto/blake2/blake2s.h"

#include <stdint.h>

Expand Down Expand Up @@ -210,4 +210,4 @@ void blake2s_256_init(blake2s_ctx *ctx_opaque) {

void blake2s_256(void *out, const void *in, size_t inlen) {
blake2s(out, _256_bits, NULL, 0, in, inlen);
}
}
2 changes: 1 addition & 1 deletion core/crypto/bls/impl/bls_provider_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "crypto/bls/impl/bls_provider_impl.hpp"
#include "filecoin/crypto/bls/impl/bls_provider_impl.hpp"

#include <gsl/gsl_util>

Expand Down
4 changes: 2 additions & 2 deletions core/crypto/hasher/hasher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "hasher.hpp"
#include "filecoin/crypto/hasher/hasher.hpp"

#include <libp2p/crypto/sha/sha256.hpp>
#include "crypto/blake2/blake2b160.hpp"
#include "filecoin/crypto/blake2/blake2b160.hpp"

namespace fc::crypto {
std::map<Hasher::HashType, Hasher::HashMethod> Hasher::methods_{
Expand Down
4 changes: 2 additions & 2 deletions core/crypto/murmur/murmur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "crypto/murmur/murmur.hpp"
#include "filecoin/crypto/murmur/murmur.hpp"

#include <common/buffer.hpp>
#include "filecoin/common/buffer.hpp"

namespace fc::crypto::murmur {
uint64_t getUint64LE(gsl::span<const uint8_t> bytes) {
Expand Down
10 changes: 5 additions & 5 deletions core/crypto/randomness/impl/chain_randomness_provider_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "crypto/randomness/impl/chain_randomness_provider_impl.hpp"
#include "filecoin/crypto/randomness/impl/chain_randomness_provider_impl.hpp"

#include <boost/assert.hpp>
#include <libp2p/crypto/sha/sha256.hpp>
#include "common/le_encoder.hpp"
#include "primitives/ticket/ticket.hpp"
#include "primitives/tipset/tipset_key.hpp"
#include "storage/chain/chain_store.hpp"
#include "filecoin/common/le_encoder.hpp"
#include "filecoin/primitives/ticket/ticket.hpp"
#include "filecoin/primitives/tipset/tipset_key.hpp"
#include "filecoin/storage/chain/chain_store.hpp"

namespace fc::crypto::randomness {

Expand Down
4 changes: 2 additions & 2 deletions core/crypto/randomness/impl/randomness_provider_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "crypto/randomness/impl/randomness_provider_impl.hpp"
#include "filecoin/crypto/randomness/impl/randomness_provider_impl.hpp"

#include <libp2p/crypto/sha/sha256.hpp>
#include "common/le_encoder.hpp"
#include "filecoin/common/le_encoder.hpp"

namespace fc::crypto::randomness {

Expand Down
2 changes: 1 addition & 1 deletion core/crypto/signature/signature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "crypto/signature/signature.hpp"
#include "filecoin/crypto/signature/signature.hpp"

OUTCOME_CPP_DEFINE_CATEGORY(fc::crypto::signature, SignatureError, e) {
using fc::crypto::signature::SignatureError;
Expand Down
Loading

0 comments on commit bdf013a

Please sign in to comment.