Skip to content

Commit

Permalink
<fix>(build): fix boost uuid exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
kyonRay committed Dec 14, 2023
1 parent a6c64cf commit 78c78a2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ if (WIN32)
add_definitions(-D_WIN32_WINNT=0x0601)
add_definitions(-DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN7)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS "ON")
else ()
add_definitions(-DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX=1)
add_definitions(-DBOOST_UUID_RANDOM_PROVIDER_SHOW=1)
endif ()

set(JAVA_SDK_JNI_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake" CACHE PATH "The cmake path for the library")
Expand Down
9 changes: 9 additions & 0 deletions test/testTransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <bcos-cpp-sdk/utilities/crypto/Common.h>
#include <boost/test/tools/old/interface.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/uuid/random_generator.hpp>

using namespace bcos;

Expand All @@ -34,7 +35,15 @@ struct TestTxFixture
};

BOOST_FIXTURE_TEST_SUITE(TransactionTest, TestTxFixture)
#if defined(BOOST_UUID_RANDOM_PROVIDER_SHOW)
#define PRINT_MACRO_HELPER(x) #x
#define PRINT_MACRO(x) #x"=" PRINT_MACRO_HELPER(x)
#pragma message(PRINT_MACRO(BOOST_UUID_RANDOM_PROVIDER_NAME))
#endif

#if defined(BOOST_UUID_RANDOM_PROVIDER_POSIX)
#pragma message(PRINT_MACRO(BOOST_UUID_RANDOM_PROVIDER_POSIX))
#endif
const char* g_hw_abi =
"[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],"
"\"name\":\"get\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}]"
Expand Down
7 changes: 4 additions & 3 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"registries": [
{
"kind": "git",
"repository": "https://github.com/FISCO-BCOS/registry",
"baseline": "c15466a352b8daede8d2c447670a761ad736c132",
"repository": "https://github.com/kyonRay/registry",
"baseline": "84d96c5f86d5605ce41cbe6dedb3f1e708a43c5b",
"packages": [
"openssl",
"hsm-crypto",
"fisco-bcos-cpp-sdk",
"wedprcrypto",
"secp256k1"
"secp256k1",
"boost-uuid"
]
}
]
Expand Down

0 comments on commit 78c78a2

Please sign in to comment.