Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
SChernykh committed Jan 29, 2024
1 parent 3731820 commit 91cc042
Show file tree
Hide file tree
Showing 30 changed files with 16,299 additions and 65,499 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
[submodule "external/src/protobuf"]
path = external/src/protobuf
url = https://github.com/SChernykh/protobuf
[submodule "external/src/protobuf-c"]
path = external/src/protobuf-c
url = https://github.com/SChernykh/protobuf-c
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ option(DEV_TRACK_MEMORY "[Developer only] Track memory allocations" OFF)

set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT p2pool)

add_subdirectory(external/src/protobuf)
set(LIBS ${LIBS} libprotobuf)

add_subdirectory(external/src/Tari)
set(LIBS ${LIBS} Tari_gRPC)

Expand Down Expand Up @@ -77,6 +74,7 @@ set(HEADERS
external/src/crypto/sha256.h
external/src/cryptonote/crypto-ops.h
external/src/hardforks/hardforks.h
external/src/protobuf-c/protobuf-c/protobuf-c.h
src/block_cache.h
src/block_template.h
src/common.h
Expand Down Expand Up @@ -110,6 +108,7 @@ set(SOURCES
external/src/cryptonote/crypto-ops-data.c
external/src/cryptonote/crypto-ops.c
external/src/hardforks/hardforks.cpp
external/src/protobuf-c/protobuf-c/protobuf-c.c
src/block_cache.cpp
src/block_template.cpp
src/console_commands.cpp
Expand Down Expand Up @@ -177,7 +176,7 @@ include_directories(external/src/robin-hood-hashing/src/include)
if (WITH_UPNP)
include_directories(external/src/miniupnp/miniupnpc/include)
endif()
include_directories(external/src/protobuf/src)
include_directories(external/src/protobuf-c)

if (WIN32)
set(LIBS ${LIBS} ws2_32 iphlpapi userenv psapi dnsapi dbghelp)
Expand Down
27 changes: 13 additions & 14 deletions external/src/Tari/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,25 @@ cmake_minimum_required(VERSION 3.10)
project(Tari_gRPC)

set(HEADERS
proto/gRPC/base_node.pb.h
proto/gRPC/block.pb.h
proto/gRPC/network.pb.h
proto/gRPC/sidechain_types.pb.h
proto/gRPC/transaction.pb.h
proto/gRPC/types.pb.h
proto/gRPC/base_node.pb-c.h
proto/gRPC/block.pb-c.h
proto/gRPC/network.pb-c.h
proto/gRPC/sidechain_types.pb-c.h
proto/gRPC/transaction.pb-c.h
proto/gRPC/types.pb-c.h
proto.h
)

set(SOURCES
proto/gRPC/base_node.pb.cc
proto/gRPC/block.pb.cc
proto/gRPC/network.pb.cc
proto/gRPC/sidechain_types.pb.cc
proto/gRPC/transaction.pb.cc
proto/gRPC/types.pb.cc
proto/gRPC/base_node.pb-c.c
proto/gRPC/block.pb-c.c
proto/gRPC/network.pb-c.c
proto/gRPC/sidechain_types.pb-c.c
proto/gRPC/transaction.pb-c.c
proto/gRPC/types.pb-c.c
)

include_directories(../protobuf/src)
include_directories(../protobuf/third_party/abseil-cpp)
include_directories(../protobuf-c)

set(DISABLE_WARNINGS ON)

Expand Down
16 changes: 10 additions & 6 deletions external/src/Tari/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
#pragma warning(push, 0)
#endif

#include "proto/gRPC/base_node.pb.h"
#include "proto/gRPC/block.pb.h"
#include "proto/gRPC/network.pb.h"
#include "proto/gRPC/sidechain_types.pb.h"
#include "proto/gRPC/transaction.pb.h"
#include "proto/gRPC/types.pb.h"
extern "C" {

#include "proto/gRPC/base_node.pb-c.h"
#include "proto/gRPC/block.pb-c.h"
#include "proto/gRPC/network.pb-c.h"
#include "proto/gRPC/sidechain_types.pb-c.h"
#include "proto/gRPC/transaction.pb-c.h"
#include "proto/gRPC/types.pb-c.h"

}

#ifdef _MSC_VER
#pragma warning(pop)
Expand Down
Loading

0 comments on commit 91cc042

Please sign in to comment.