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 f2e581b
Show file tree
Hide file tree
Showing 33 changed files with 16,701 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
5 changes: 1 addition & 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 @@ -177,7 +174,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
31 changes: 17 additions & 14 deletions external/src/Tari/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,29 @@ 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
../protobuf-c/protobuf-c/protobuf-c.h
proto/gRPC/google/protobuf/timestamp.pb-c.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
../protobuf-c/protobuf-c/protobuf-c.c
proto/gRPC/google/protobuf/timestamp.pb-c.c
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 f2e581b

Please sign in to comment.