You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.5 KiB

Cross compiling fixes and improvements (#59) * CMake: Expose CMake options to includes This change shuffles the order of several CMake steps to expose CMake options to included files. By defining options before inclusion, included files are able to access the input provided by the build system. * CMake: Exclude test dependencies when building tests * CMake: Allow build system to provide protobuf compiler When building without Hunter, it is desirable to pass the path to protoc and the protobuf include directory from the build system. Allow these variables to be overridden. Fixes the error: | CMake Error at cmake/functions.cmake:52 (message): | Protobuf_PROTOC_EXECUTABLE is empty | Call Stack (most recent call first): | cmake/functions.cmake:96 (compile_proto_to_cpp) | src/crypto/protobuf/CMakeLists.txt:6 (add_proto_library) * Fix build error due to missing include Error was: | literals.cpp: In function 'libp2p::common::Hash256 libp2p::common::operator""_hash256(const char*, size_t)': | literals.cpp:17:36: error: no matching function for call to 'min(size_t&, long unsigned int)' | 17 | std::copy_n(c, std::min(s, 32ul), hash.rbegin()); | | ^ * Fix build error due to mismatched types Error was: | literals.cpp: In function 'libp2p::common::Hash256 libp2p::common::operator""_hash256(const char*, size_t)': | literals.cpp:19:36: error: no matching function for call to 'min(size_t&, long unsigned int)' | 19 | std::copy_n(c, std::min(s, 32ul), hash.rbegin()); | | ^ * Fix compiler warning due to sign comparison When compiling with -Werror, this causes the build to fail. Warning was: | yamux_frame.cpp:103:28: error: comparison of integers of different signs: 'gsl::span::index_type' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Werror,-Wsign-compare] | if (frame_bytes.size() < YamuxFrame::kHeaderLength) { | ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
4 years ago
#
# Copyright Quadrivium LLC
# All Rights Reserved
Cross compiling fixes and improvements (#59) * CMake: Expose CMake options to includes This change shuffles the order of several CMake steps to expose CMake options to included files. By defining options before inclusion, included files are able to access the input provided by the build system. * CMake: Exclude test dependencies when building tests * CMake: Allow build system to provide protobuf compiler When building without Hunter, it is desirable to pass the path to protoc and the protobuf include directory from the build system. Allow these variables to be overridden. Fixes the error: | CMake Error at cmake/functions.cmake:52 (message): | Protobuf_PROTOC_EXECUTABLE is empty | Call Stack (most recent call first): | cmake/functions.cmake:96 (compile_proto_to_cpp) | src/crypto/protobuf/CMakeLists.txt:6 (add_proto_library) * Fix build error due to missing include Error was: | literals.cpp: In function 'libp2p::common::Hash256 libp2p::common::operator""_hash256(const char*, size_t)': | literals.cpp:17:36: error: no matching function for call to 'min(size_t&, long unsigned int)' | 17 | std::copy_n(c, std::min(s, 32ul), hash.rbegin()); | | ^ * Fix build error due to mismatched types Error was: | literals.cpp: In function 'libp2p::common::Hash256 libp2p::common::operator""_hash256(const char*, size_t)': | literals.cpp:19:36: error: no matching function for call to 'min(size_t&, long unsigned int)' | 19 | std::copy_n(c, std::min(s, 32ul), hash.rbegin()); | | ^ * Fix compiler warning due to sign comparison When compiling with -Werror, this causes the build to fail. Warning was: | yamux_frame.cpp:103:28: error: comparison of integers of different signs: 'gsl::span::index_type' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Werror,-Wsign-compare] | if (frame_bytes.size() < YamuxFrame::kHeaderLength) { | ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
4 years ago
# SPDX-License-Identifier: Apache-2.0
#
if (TESTING)
# https://docs.hunter.sh/en/latest/packages/pkg/GTest.html
hunter_add_package(GTest)
find_package(GTest CONFIG REQUIRED)
endif()
5 years ago
# https://docs.hunter.sh/en/latest/packages/pkg/Boost.html
Gossip pr 3 (#48) * gossip: wire protocol * gossip: peer set and wire protocol utilities revised * gossip: msg cache w/expiration * data structures for gossip: fixes and unittest * changes due to pr 1 feedback * one more fix due to PR requests * one more try against ci * gossip part 2 * gossip: pr1 reflects pr2 * gossip: pr1 reflects pr2 * Fix/gossip pr 1 (#46) * Fix build for macos * Improvements * deprecated logic removed * gossip: cleanups and renamings * gossip: renmings * gossip serialization method signature changed * gossip: serialization signature changed * Gossip pr 1 (#37) * gossip: wire protocol * gossip: peer set and wire protocol utilities revised * gossip: msg cache w/expiration * data structures for gossip: fixes and unittest * changes due to pr 1 feedback * one more fix due to PR requests * one more try against ci * gossip: pr1 reflects pr2 * gossip: pr1 reflects pr2 * Fix/gossip pr 1 (#46) * Fix build for macos * Improvements * deprecated logic removed * gossip: cleanups and renamings * gossip: renmings * gossip serialization method signature changed Co-authored-by: kamilsa <kamilsa16@gmail.com> * refactorings * typo fixed * minor fixes * +gossip-example * +gossip-example * fixes and example * debug things * gossip: subscriptions test and bugfixes * dont forward messages back to their origins * injectors made parametric (to build examples) * gossip: fixes * more fixes in pub-sub * fixes in gossip example * sublogger can set new instance name * message cache fix exp times * chat example * logs and traces added for debug purposes * README.md for gossip examples * small patch for older stdlibs support * more logs and traces * more logs and traces * new inbound protocol streams are allowed for all connections * streams issues fixed * gossip injector fixed * gossip new example * boost_program_options in dependencies * scheduler with config param (strong type for injector) * tests fixed due to recent changes * cleanup in yamux and dialer-listener hotfixes * hotfixes to yamux and dialer * yamux changes * parametrized netork and host injectors * streams regression test * patched mplex connections/streams so that streams get notified about EOF Co-authored-by: kamilsa <kamilsa16@gmail.com>
5 years ago
hunter_add_package(Boost COMPONENTS random filesystem program_options)
find_package(Boost CONFIG REQUIRED random filesystem program_options)
5 years ago
5 years ago
# https://www.openssl.org/
hunter_add_package(BoringSSL)
find_package(OpenSSL CONFIG REQUIRED)
hunter_add_package(libsecp256k1)
find_package(libsecp256k1 CONFIG REQUIRED)
5 years ago
hunter_add_package(lsquic)
find_package(lsquic CONFIG REQUIRED)
5 years ago
# https://developers.google.com/protocol-buffers/
hunter_add_package(Protobuf)
find_package(Protobuf CONFIG REQUIRED)
hunter_add_package(qtils)
find_package(qtils CONFIG REQUIRED)
find_package(Threads)
hunter_add_package(c-ares)
find_package(c-ares CONFIG REQUIRED)
hunter_add_package(fmt)
find_package(fmt CONFIG REQUIRED)
hunter_add_package(yaml-cpp)
find_package(yaml-cpp CONFIG REQUIRED)
hunter_add_package(soralog)
find_package(soralog CONFIG REQUIRED)
# https://github.com/masterjedy/hat-trie
hunter_add_package(tsl_hat_trie)
find_package(tsl_hat_trie CONFIG REQUIRED)
# https://github.com/masterjedy/di
hunter_add_package(Boost.DI)
find_package(Boost.DI CONFIG REQUIRED)
# https://github.com/qdrvm/libp2p-sqlite-modern-cpp/tree/hunter
hunter_add_package(SQLiteModernCpp)
find_package(SQLiteModernCpp CONFIG REQUIRED)