Skip to content

Commit f34b82b

Browse files
authored
Merge pull request #10 from scala-network/impl/felidae
Impl: Felidae, prep for V8, prelim V7.9
2 parents cb04705 + 56b0ccc commit f34b82b

Some content is hidden

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

50 files changed

+1477
-188
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@
1515
[submodule "external/trezor-common"]
1616
path = external/trezor-common
1717
url = https://github.com/trezor/trezor-common.git
18+
[submodule "external/felidae"]
19+
path = external/felidae
20+
url = https://github.com/scala-network/felidae

Brewfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
tap "bottech/outcasts"
2+
tap "homebrew/bundle"
3+
tap "homebrew/cask"
4+
tap "homebrew/cask-versions"
5+
tap "homebrew/core"
6+
brew "boost"
7+
brew "ccache"
8+
brew "cmake"
9+
brew "expat"
10+
brew "git"
11+
brew "htop"
12+
brew "openssl@1.1"
13+
brew "libgcrypt"
14+
brew "libpgm"
15+
brew "libsodium"
16+
brew "libunwind-headers"
17+
brew "miniupnpc"
18+
brew "node"
19+
brew "pkg-config"
20+
brew "protobuf"
21+
brew "qrencode"
22+
brew "smartmontools"
23+
brew "tmux"
24+
brew "zeromq"
25+
brew "bottech/outcasts/cppzmq"

CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,18 @@ function (scala_add_library_with_deps)
103103
endfunction ()
104104

105105
function (add_c_flag_if_supported flag var)
106-
string(REPLACE "-" "_" supported ${flag}_c)
107-
check_c_compiler_flag(${flag} ${supported})
106+
set(TMP "-Werror ${flag}")
107+
string(REGEX REPLACE "[- ]" "_" supported ${TMP}_c)
108+
check_c_compiler_flag(${TMP} ${supported})
108109
if(${${supported}})
109110
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
110111
endif()
111112
endfunction()
112113

113114
function (add_cxx_flag_if_supported flag var)
114-
string(REPLACE "-" "_" supported ${flag}_cxx)
115-
check_cxx_compiler_flag(${flag} ${supported})
115+
set(TMP "-Werror ${flag}")
116+
string(REGEX REPLACE "[- ]" "_" supported ${TMP}_cxx)
117+
check_cxx_compiler_flag(${TMP} ${supported})
116118
if(${${supported}})
117119
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
118120
endif()
@@ -241,6 +243,7 @@ if(CHECK_SUBMODULES)
241243
check_submodule(external/rapidjson)
242244
check_submodule(external/trezor-common)
243245
check_submodule(external/randomx)
246+
check_submodule(external/felidae)
244247
endif()
245248
endif()
246249

@@ -461,7 +464,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)")
461464
endif ()
462465

463466
if (APPLE AND NOT IOS)
464-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11")
467+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -std=c++11")
465468
if (NOT OpenSSL_DIR)
466469
EXECUTE_PROCESS(COMMAND brew --prefix openssl
467470
OUTPUT_VARIABLE OPENSSL_ROOT_DIR

contrib/brew/Brewfile.lock.json

Lines changed: 959 additions & 0 deletions
Large diffs are not rendered by default.

contrib/epee/include/console_handler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ namespace epee
196196
if (m_read_status == state_cancelled)
197197
return false;
198198

199-
int retval = ::WaitForSingleObject(::GetStdHandle(STD_INPUT_HANDLE), 100);
199+
DWORD retval = ::WaitForSingleObject(::GetStdHandle(STD_INPUT_HANDLE), 100);
200200
switch (retval)
201201
{
202202
case WAIT_FAILED:

contrib/epee/include/string_tools.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include <boost/lexical_cast.hpp>
4444
#include <boost/algorithm/string/predicate.hpp>
4545
#include <boost/utility/string_ref.hpp>
46+
#include <boost/algorithm/string.hpp>
4647
#include "misc_log_ex.h"
4748
#include "storages/parserse_base_utils.h"
4849
#include "hex.h"
@@ -124,6 +125,8 @@ POP_WARNINGS
124125
}
125126
//----------------------------------------------------------------------------
126127
std::string get_ip_string_from_int32(uint32_t ip);
128+
//----------------------------------------------------------------------------
129+
std::vector<std::string> split_string_wd(const std::string str_, const std::string delim_);
127130
//----------------------------------------------------------------------------
128131
bool get_ip_int32_from_string(uint32_t& ip, const std::string& ip_str);
129132
//----------------------------------------------------------------------------

contrib/epee/src/string_tools.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525
//
2626

27-
#include "string_tools.h"
28-
27+
#include <vector>
2928
#include <ctype.h>
3029

3130
#ifdef _WIN32
@@ -35,6 +34,8 @@
3534
# include <netinet/in.h>
3635
#endif
3736

37+
#include "string_tools.h"
38+
3839
namespace epee
3940
{
4041
namespace string_tools
@@ -49,6 +50,13 @@ namespace string_tools
4950
else
5051
return "[failed]";
5152
}
53+
54+
std::vector<std::string> split_string_wd(const std::string str_, const std::string delim_) {
55+
std::vector<std::string> results;
56+
boost::algorithm::split(results, str_, boost::is_any_of(delim_));
57+
return results;
58+
}
59+
5260
//----------------------------------------------------------------------------
5361
bool get_ip_int32_from_string(uint32_t& ip, const std::string& ip_str)
5462
{

external/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,4 @@ endif()
8181
add_subdirectory(db_drivers)
8282
add_subdirectory(easylogging++)
8383
add_subdirectory(randomx EXCLUDE_FROM_ALL)
84+
add_subdirectory(felidae EXCLUDE_FROM_ALL)

external/easylogging++/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@
2727
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

2929
cmake_minimum_required(VERSION 2.8.7)
30-
3130
project(easylogging CXX)
3231

33-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
32+
set(CMAKE_CXX_STANDARD 11)
33+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
34+
set(CMAKE_CXX_EXTENSIONS OFF)
3435

3536
find_package(Threads)
3637
find_package(Backtrace)

external/felidae

Submodule felidae added at ac23eb0

0 commit comments

Comments
 (0)