mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-02 08:25:55 +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)
|
||||
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:
|
||||
@@ -1014,6 +1026,7 @@ target_link_libraries (rippled
|
||||
Ripple::opts
|
||||
Ripple::libs
|
||||
Ripple::xrpl_core
|
||||
${ACL_LIBRARY}
|
||||
)
|
||||
exclude_if_included (rippled)
|
||||
# define a macro for tests that might need to
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <ripple/protocol/Import.h>
|
||||
#include <ripple/protocol/jss.h>
|
||||
#include <test/jtx.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#define BEAST_REQUIRE(x) \
|
||||
{ \
|
||||
@@ -121,8 +122,8 @@ class Import_test : public beast::unit_test::suite
|
||||
try
|
||||
{
|
||||
// check if file exists and is not empty
|
||||
if (!std::filesystem::exists(fn) ||
|
||||
std::filesystem::file_size(fn) == 0)
|
||||
if (!boost::filesystem::exists(fn) ||
|
||||
boost::filesystem::file_size(fn) == 0)
|
||||
{
|
||||
std::cout << "file was zero size or didn't exist"
|
||||
<< "\n";
|
||||
@@ -146,7 +147,7 @@ class Import_test : public beast::unit_test::suite
|
||||
return {};
|
||||
}
|
||||
}
|
||||
catch (std::filesystem::filesystem_error& e)
|
||||
catch (boost::filesystem::filesystem_error& e)
|
||||
{
|
||||
std::cout << "Failed to load file " + fn + " (" + e.what() + ")";
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user