mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
change to boost::filesystem to support older compilers
This commit is contained in:
@@ -13,6 +13,18 @@ if (unity)
|
|||||||
set_target_properties(xrpl_core PROPERTIES UNITY_BUILD ON)
|
set_target_properties(xrpl_core PROPERTIES UNITY_BUILD ON)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# Find the ACL library
|
||||||
|
find_library(ACL_LIBRARY
|
||||||
|
NAMES acl
|
||||||
|
)
|
||||||
|
|
||||||
|
# Check that the ACL library was found
|
||||||
|
if(ACL_LIBRARY)
|
||||||
|
message("ACL library found at ${ACL_LIBRARY}")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "ACL library not found")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
#[===============================[
|
#[===============================[
|
||||||
beast/legacy FILES:
|
beast/legacy FILES:
|
||||||
@@ -1014,6 +1026,7 @@ target_link_libraries (rippled
|
|||||||
Ripple::opts
|
Ripple::opts
|
||||||
Ripple::libs
|
Ripple::libs
|
||||||
Ripple::xrpl_core
|
Ripple::xrpl_core
|
||||||
|
${ACL_LIBRARY}
|
||||||
)
|
)
|
||||||
exclude_if_included (rippled)
|
exclude_if_included (rippled)
|
||||||
# define a macro for tests that might need to
|
# define a macro for tests that might need to
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <ripple/protocol/Import.h>
|
#include <ripple/protocol/Import.h>
|
||||||
#include <ripple/protocol/jss.h>
|
#include <ripple/protocol/jss.h>
|
||||||
#include <test/jtx.h>
|
#include <test/jtx.h>
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
#define BEAST_REQUIRE(x) \
|
#define BEAST_REQUIRE(x) \
|
||||||
{ \
|
{ \
|
||||||
@@ -121,8 +122,8 @@ class Import_test : public beast::unit_test::suite
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// check if file exists and is not empty
|
// check if file exists and is not empty
|
||||||
if (!std::filesystem::exists(fn) ||
|
if (!boost::filesystem::exists(fn) ||
|
||||||
std::filesystem::file_size(fn) == 0)
|
boost::filesystem::file_size(fn) == 0)
|
||||||
{
|
{
|
||||||
std::cout << "file was zero size or didn't exist"
|
std::cout << "file was zero size or didn't exist"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
@@ -146,7 +147,7 @@ class Import_test : public beast::unit_test::suite
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (std::filesystem::filesystem_error& e)
|
catch (boost::filesystem::filesystem_error& e)
|
||||||
{
|
{
|
||||||
std::cout << "Failed to load file " + fn + " (" + e.what() + ")";
|
std::cout << "Failed to load file " + fn + " (" + e.what() + ")";
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
Reference in New Issue
Block a user