refactor: Rename cmake files and definitions

This commit is contained in:
Bart Thomee
2025-10-30 15:11:18 -04:00
parent 4af408fcd6
commit 115f01978d
22 changed files with 165 additions and 86 deletions

View File

@@ -21,10 +21,16 @@ run from the repository root.
`XRPL_XXX`. `XRPL_XXX`.
2. `.github/scripts/rename/copyright.sh`: This script will remove superflous 2. `.github/scripts/rename/copyright.sh`: This script will remove superflous
copyright notices. copyright notices.
3. `.github/scripts/rename/copyright.sh`: This script will rename all CMake
files from `RippleXXX.cmake` or `RippledXXX.cmake` to `XrplXXX.cmake`, and
any references to `ripple` and `rippled` (with or without capital letters) to
`xrpl` and `xrpld`, respectively. The name of the binary will remain as-is,
and will only be renamed to `xrpld` by a later script.
You can run all these scripts from the repository root as follows: You can run all these scripts from the repository root as follows:
```shell ```shell
./.github/scripts/rename/definitions.sh . ./.github/scripts/rename/definitions.sh .
./.github/scripts/rename/copyright.sh . ./.github/scripts/rename/copyright.sh .
./.github/scripts/rename/cmake.sh .
``` ```

71
.github/scripts/rename/cmake.sh vendored Executable file
View File

@@ -0,0 +1,71 @@
#!/bin/bash
# Exit the script as soon as an error occurs.
set -e
# On MacOS, ensure that GNU sed and head are installed and available as `gsed`
# and `ghead`, respectively.
SED_COMMAND=sed
HEAD_COMMAND=head
if [[ "$OSTYPE" == "darwin"* ]]; then
if ! command -v gsed &> /dev/null; then
echo "Error: gsed is not installed. Please install it using 'brew install gnu-sed'."
exit 1
fi
SED_COMMAND=gsed
if ! command -v ghead &> /dev/null; then
echo "Error: ghead is not installed. Please install it using 'brew install coreutils'."
exit 1
fi
HEAD_COMMAND=ghead
fi
# This script renames CMake files from `RippleXXX.cmake` or `RippledXXX.cmake`
# to `XrplXXX.cmake`, and any references to `ripple` and `rippled` (with or
# without capital letters) to `xrpl` and `xrpld`, respectively. The name of the
# binary will remain as-is, and will only be renamed to `xrpld` in a different
# script, but the proto file will be renamed.
# Usage: .github/scripts/rename/cmake.sh <repository directory>
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <repository directory>"
exit 1
fi
DIRECTORY=$1
echo "Processing directory: ${DIRECTORY}"
if [ ! -d "${DIRECTORY}" ]; then
echo "Error: Directory '${DIRECTORY}' does not exist."
exit 1
fi
# Rename the files.
for FILE in ${DIRECTORY}/cmake/Ripple*.cmake; do
echo "${FILE}"
mv "${FILE}" "$(echo "${FILE}" | ${SED_COMMAND} -E 's/Rippled?/Xrpl/')"
done
mv ${DIRECTORY}/cmake/xrpl_add_test.cmake ${DIRECTORY}/cmake/XrplAddTest.cmake
mv ${DIRECTORY}/include/xrpl/proto/ripple.proto ${DIRECTORY}/include/xrpl/proto/xrpl.proto
# Rename inside the files.
find "${DIRECTORY}/cmake" -type f -name "*.cmake" | while read -r FILE; do
echo "Processing file: ${FILE}"
${SED_COMMAND} -i 's/Rippled/Xrpld/g' "${FILE}"
${SED_COMMAND} -i 's/Ripple/Xrpl/g' "${FILE}"
${SED_COMMAND} -i 's/rippled/xrpld/g' "${FILE}"
${SED_COMMAND} -i 's/ripple/xrpl/g' "${FILE}"
done
${SED_COMMAND} -i -E 's/Rippled?/Xrpl/g' "${DIRECTORY}/CMakeLists.txt"
${SED_COMMAND} -i 's/ripple/xrpl/g' "${DIRECTORY}/CMakeLists.txt"
${SED_COMMAND} -i 's/include(xrpl_add_test)/include(XrplAddTest)/g' "${DIRECTORY}/src/tests/libxrpl/CMakeLists.txt"
${SED_COMMAND} -i 's/ripple.pb.h/xrpl.pb.h/g' "${DIRECTORY}/include/xrpl/protocol/messages.h"
${SED_COMMAND} -i 's/ripple.pb.h/xrpl.pb.h/g' "${DIRECTORY}/BUILD.md"
# Ensure the name of the binary remains 'rippled' for now.
ghead -n -2 "${DIRECTORY}/cmake/XrplCore.cmake" > cmake.tmp
echo ' # For the time being, we will keep the name of the binary as it was.' >> cmake.tmp
echo ' set_target_properties(xrpld PROPERTIES OUTPUT_NAME "rippled")' >> cmake.tmp
tail -2 "${DIRECTORY}/cmake/XrplCore.cmake" >> cmake.tmp
mv cmake.tmp "${DIRECTORY}/cmake/XrplCore.cmake"
echo "Renaming complete."

View File

@@ -18,10 +18,10 @@ fi
# XRPLF, and certain individual contributors upon mutual agreement, so the one # XRPLF, and certain individual contributors upon mutual agreement, so the one
# in the LICENSE.md file applies throughout. Copyright notices referencing # in the LICENSE.md file applies throughout. Copyright notices referencing
# external contributions, e.g. from Bitcoin, remain as-is. # external contributions, e.g. from Bitcoin, remain as-is.
# Usage: .github/scripts/rename/copyright.sh <directory> # Usage: .github/scripts/rename/copyright.sh <repository directory>
if [ "$#" -ne 1 ]; then if [ "$#" -ne 1 ]; then
echo "Usage: $0 <directory>" echo "Usage: $0 <repository directory>"
exit 1 exit 1
fi fi

View File

@@ -17,10 +17,10 @@ fi
# Specifically, it renames "RIPPLED_XXX" and "RIPPLE_XXX" to "XRPL_XXX" by # Specifically, it renames "RIPPLED_XXX" and "RIPPLE_XXX" to "XRPL_XXX" by
# scanning all cmake, header, and source files in the specified directory and # scanning all cmake, header, and source files in the specified directory and
# its subdirectories. # its subdirectories.
# Usage: .github/scripts/rename/definitions.sh <directory> # Usage: .github/scripts/rename/definitions.sh <repository directory>
if [ "$#" -ne 1 ]; then if [ "$#" -ne 1 ]; then
echo "Usage: $0 <directory>" echo "Usage: $0 <repository directory>"
exit 1 exit 1
fi fi

View File

@@ -590,7 +590,7 @@ you might have generated CMake files for a different `build_type` than the
`CMAKE_BUILD_TYPE` you passed to Conan. `CMAKE_BUILD_TYPE` you passed to Conan.
``` ```
/rippled/.build/pb-xrpl.libpb/xrpl/proto/ripple.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found /rippled/.build/pb-xrpl.libpb/xrpl/proto/xrpl.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found
10 | #include <google/protobuf/port_def.inc> 10 | #include <google/protobuf/port_def.inc>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated. 1 error generated.

View File

@@ -62,9 +62,9 @@ if (target)
message (FATAL_ERROR "The target option has been removed - use native cmake options to control build") message (FATAL_ERROR "The target option has been removed - use native cmake options to control build")
endif () endif ()
include(RippledSanity) include(XrplSanity)
include(RippledVersion) include(XrplVersion)
include(RippledSettings) include(XrplSettings)
# this check has to remain in the top-level cmake # this check has to remain in the top-level cmake
# because of the early return statement # because of the early return statement
if (packages_only) if (packages_only)
@@ -73,11 +73,11 @@ if (packages_only)
endif() endif()
return () return ()
endif () endif ()
include(RippledCompiler) include(XrplCompiler)
include(RippledInterface) include(XrplInterface)
option(only_docs "Include only the docs target?" FALSE) option(only_docs "Include only the docs target?" FALSE)
include(RippledDocs) include(XrplDocs)
if(only_docs) if(only_docs)
return() return()
endif() endif()
@@ -114,14 +114,14 @@ if(rocksdb)
set_target_properties(RocksDB::rocksdb PROPERTIES set_target_properties(RocksDB::rocksdb PROPERTIES
INTERFACE_COMPILE_DEFINITIONS XRPL_ROCKSDB_AVAILABLE=1 INTERFACE_COMPILE_DEFINITIONS XRPL_ROCKSDB_AVAILABLE=1
) )
target_link_libraries(ripple_libs INTERFACE RocksDB::rocksdb) target_link_libraries(xrpl_libs INTERFACE RocksDB::rocksdb)
endif() endif()
find_package(nudb REQUIRED) find_package(nudb REQUIRED)
find_package(date REQUIRED) find_package(date REQUIRED)
find_package(xxHash REQUIRED) find_package(xxHash REQUIRED)
target_link_libraries(ripple_libs INTERFACE target_link_libraries(xrpl_libs INTERFACE
ed25519::ed25519 ed25519::ed25519
lz4::lz4 lz4::lz4
OpenSSL::Crypto OpenSSL::Crypto
@@ -139,16 +139,16 @@ elseif(TARGET NuDB::nudb)
else() else()
message(FATAL_ERROR "unknown nudb target") message(FATAL_ERROR "unknown nudb target")
endif() endif()
target_link_libraries(ripple_libs INTERFACE ${nudb}) target_link_libraries(xrpl_libs INTERFACE ${nudb})
if(coverage) if(coverage)
include(RippledCov) include(XrplCov)
endif() endif()
set(PROJECT_EXPORT_SET RippleExports) set(PROJECT_EXPORT_SET XrplExports)
include(RippledCore) include(XrplCore)
include(RippledInstall) include(XrplInstall)
include(RippledValidatorKeys) include(XrplValidatorKeys)
if(tests) if(tests)
include(CTest) include(CTest)

View File

@@ -7,9 +7,9 @@
toolchain file, especially the ABI-impacting ones toolchain file, especially the ABI-impacting ones
#]=========================================================] #]=========================================================]
add_library (common INTERFACE) add_library (common INTERFACE)
add_library (Ripple::common ALIAS common) add_library (Xrpl::common ALIAS common)
# add a single global dependency on this interface lib # add a single global dependency on this interface lib
link_libraries (Ripple::common) link_libraries (Xrpl::common)
set_target_properties (common set_target_properties (common
PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON) PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)

View File

@@ -53,4 +53,4 @@ if (TARGET ZLIB::ZLIB)
INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
endif () endif ()
include ("${CMAKE_CURRENT_LIST_DIR}/RippleTargets.cmake") include ("${CMAKE_CURRENT_LIST_DIR}/XrplTargets.cmake")

View File

@@ -13,7 +13,7 @@ set_target_properties(xrpl.libpb PROPERTIES UNITY_BUILD OFF)
target_protobuf_sources(xrpl.libpb xrpl/proto target_protobuf_sources(xrpl.libpb xrpl/proto
LANGUAGE cpp LANGUAGE cpp
IMPORT_DIRS include/xrpl/proto IMPORT_DIRS include/xrpl/proto
PROTOS include/xrpl/proto/ripple.proto PROTOS include/xrpl/proto/xrpl.proto
) )
file(GLOB_RECURSE protos "include/xrpl/proto/org/*.proto") file(GLOB_RECURSE protos "include/xrpl/proto/org/*.proto")
@@ -55,9 +55,9 @@ target_link_libraries(xrpl.imports.main
INTERFACE INTERFACE
LibArchive::LibArchive LibArchive::LibArchive
OpenSSL::Crypto OpenSSL::Crypto
Ripple::boost Xrpl::boost
Ripple::opts Xrpl::opts
Ripple::syslibs Xrpl::syslibs
absl::random_random absl::random_random
date::date date::date
ed25519::ed25519 ed25519::ed25519
@@ -150,14 +150,14 @@ target_link_modules(xrpl PUBLIC
# $<INSTALL_INTERFACE:include>) # $<INSTALL_INTERFACE:include>)
if(xrpld) if(xrpld)
add_executable(rippled) add_executable(xrpld)
if(tests) if(tests)
target_compile_definitions(rippled PUBLIC ENABLE_TESTS) target_compile_definitions(xrpld PUBLIC ENABLE_TESTS)
target_compile_definitions(rippled PRIVATE target_compile_definitions(xrpld PRIVATE
UNIT_TEST_REFERENCE_FEE=${UNIT_TEST_REFERENCE_FEE} UNIT_TEST_REFERENCE_FEE=${UNIT_TEST_REFERENCE_FEE}
) )
endif() endif()
target_include_directories(rippled target_include_directories(xrpld
PRIVATE PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
) )
@@ -165,36 +165,36 @@ if(xrpld)
file(GLOB_RECURSE sources CONFIGURE_DEPENDS file(GLOB_RECURSE sources CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/xrpld/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/xrpld/*.cpp"
) )
target_sources(rippled PRIVATE ${sources}) target_sources(xrpld PRIVATE ${sources})
if(tests) if(tests)
file(GLOB_RECURSE sources CONFIGURE_DEPENDS file(GLOB_RECURSE sources CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/test/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/test/*.cpp"
) )
target_sources(rippled PRIVATE ${sources}) target_sources(xrpld PRIVATE ${sources})
endif() endif()
target_link_libraries(rippled target_link_libraries(xrpld
Ripple::boost Xrpl::boost
Ripple::opts Xrpl::opts
Ripple::libs Xrpl::libs
xrpl.libxrpl xrpl.libxrpl
) )
exclude_if_included(rippled) exclude_if_included(xrpld)
# define a macro for tests that might need to # define a macro for tests that might need to
# be exluded or run differently in CI environment # be exluded or run differently in CI environment
if(is_ci) if(is_ci)
target_compile_definitions(rippled PRIVATE XRPL_RUNNING_IN_CI) target_compile_definitions(xrpld PRIVATE XRPL_RUNNING_IN_CI)
endif () endif ()
if(voidstar) if(voidstar)
target_compile_options(rippled target_compile_options(xrpld
PRIVATE PRIVATE
-fsanitize-coverage=trace-pc-guard -fsanitize-coverage=trace-pc-guard
) )
# rippled requires access to antithesis-sdk-cpp implementation file # xrpld requires access to antithesis-sdk-cpp implementation file
# antithesis_instrumentation.h, which is not exported as INTERFACE # antithesis_instrumentation.h, which is not exported as INTERFACE
target_include_directories(rippled target_include_directories(xrpld
PRIVATE PRIVATE
${CMAKE_SOURCE_DIR}/external/antithesis-sdk ${CMAKE_SOURCE_DIR}/external/antithesis-sdk
) )
@@ -207,5 +207,7 @@ if(xrpld)
src/test/rpc/ValidatorRPC_test.cpp src/test/rpc/ValidatorRPC_test.cpp
src/test/ledger/Invariants_test.cpp src/test/ledger/Invariants_test.cpp
PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE) PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)
# For the time being, we will keep the name of the binary as it was.
set_target_properties(xrpld PROPERTIES OUTPUT_NAME "rippled")
endif() endif()
endif() endif()

View File

@@ -31,10 +31,10 @@ list(APPEND GCOVR_ADDITIONAL_ARGS
setup_target_for_coverage_gcovr( setup_target_for_coverage_gcovr(
NAME coverage NAME coverage
FORMAT ${coverage_format} FORMAT ${coverage_format}
EXECUTABLE rippled EXECUTABLE xrpld
EXECUTABLE_ARGS --unittest$<$<BOOL:${coverage_test}>:=${coverage_test}> --unittest-jobs ${coverage_test_parallelism} --quiet --unittest-log EXECUTABLE_ARGS --unittest$<$<BOOL:${coverage_test}>:=${coverage_test}> --unittest-jobs ${coverage_test_parallelism} --quiet --unittest-log
EXCLUDE "src/test" "src/tests" "include/xrpl/beast/test" "include/xrpl/beast/unit_test" "${CMAKE_BINARY_DIR}/pb-xrpl.libpb" EXCLUDE "src/test" "src/tests" "include/xrpl/beast/test" "include/xrpl/beast/unit_test" "${CMAKE_BINARY_DIR}/pb-xrpl.libpb"
DEPENDENCIES rippled DEPENDENCIES xrpld
) )
add_code_coverage_to_target(opts INTERFACE) add_code_coverage_to_target(opts INTERFACE)

View File

@@ -8,8 +8,8 @@ install (
TARGETS TARGETS
common common
opts opts
ripple_syslibs xrpl_syslibs
ripple_boost xrpl_boost
xrpl.imports.main xrpl.imports.main
xrpl.libpb xrpl.libpb
xrpl.libxrpl.basics xrpl.libxrpl.basics
@@ -23,7 +23,7 @@ install (
xrpl.libxrpl.net xrpl.libxrpl.net
xrpl.libxrpl xrpl.libxrpl
antithesis-sdk-cpp antithesis-sdk-cpp
EXPORT RippleExports EXPORT XrplExports
LIBRARY DESTINATION lib LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
@@ -38,22 +38,22 @@ install(CODE "
set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\") set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\")
include(create_symbolic_link) include(create_symbolic_link)
create_symbolic_link(xrpl \ create_symbolic_link(xrpl \
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/ripple) \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/xrpl)
") ")
install (EXPORT RippleExports install (EXPORT XrplExports
FILE RippleTargets.cmake FILE XrplTargets.cmake
NAMESPACE Ripple:: NAMESPACE Xrpl::
DESTINATION lib/cmake/ripple) DESTINATION lib/cmake/xrpl)
include (CMakePackageConfigHelpers) include (CMakePackageConfigHelpers)
write_basic_package_version_file ( write_basic_package_version_file (
RippleConfigVersion.cmake XrplConfigVersion.cmake
VERSION ${rippled_version} VERSION ${xrpld_version}
COMPATIBILITY SameMajorVersion) COMPATIBILITY SameMajorVersion)
if (is_root_project AND TARGET rippled) if (is_root_project AND TARGET xrpld)
install (TARGETS rippled RUNTIME DESTINATION bin) install (TARGETS xrpld RUNTIME DESTINATION bin)
set_target_properties(rippled PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON) set_target_properties(xrpld PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON)
# sample configs should not overwrite existing files # sample configs should not overwrite existing files
# install if-not-exists workaround as suggested by # install if-not-exists workaround as suggested by
# https://cmake.org/Bug/view.php?id=12646 # https://cmake.org/Bug/view.php?id=12646
@@ -65,19 +65,19 @@ if (is_root_project AND TARGET rippled)
message (\"-- Skipping : \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DEST}/\${NEWNAME}\") message (\"-- Skipping : \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DEST}/\${NEWNAME}\")
endif () endif ()
endmacro() endmacro()
copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/rippled-example.cfg\" etc rippled.cfg) copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/xrpld-example.cfg\" etc xrpld.cfg)
copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/validators-example.txt\" etc validators.txt) copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/validators-example.txt\" etc validators.txt)
") ")
install(CODE " install(CODE "
set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\") set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\")
include(create_symbolic_link) include(create_symbolic_link)
create_symbolic_link(rippled${suffix} \ create_symbolic_link(xrpld${suffix} \
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/xrpld${suffix}) \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/xrpld${suffix})
") ")
endif () endif ()
install ( install (
FILES FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/RippleConfig.cmake ${CMAKE_CURRENT_SOURCE_DIR}/cmake/XrplConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/RippleConfigVersion.cmake ${CMAKE_CURRENT_BINARY_DIR}/XrplConfigVersion.cmake
DESTINATION lib/cmake/ripple) DESTINATION lib/cmake/xrpl)

View File

@@ -1,9 +1,9 @@
#[===================================================================[ #[===================================================================[
rippled compile options/settings via an interface library xrpld compile options/settings via an interface library
#]===================================================================] #]===================================================================]
add_library (opts INTERFACE) add_library (opts INTERFACE)
add_library (Ripple::opts ALIAS opts) add_library (Xrpl::opts ALIAS opts)
target_compile_definitions (opts target_compile_definitions (opts
INTERFACE INTERFACE
BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS
@@ -59,12 +59,12 @@ if (san)
endif () endif ()
#[===================================================================[ #[===================================================================[
rippled transitive library deps via an interface library xrpld transitive library deps via an interface library
#]===================================================================] #]===================================================================]
add_library (ripple_syslibs INTERFACE) add_library (xrpl_syslibs INTERFACE)
add_library (Ripple::syslibs ALIAS ripple_syslibs) add_library (Xrpl::syslibs ALIAS xrpl_syslibs)
target_link_libraries (ripple_syslibs target_link_libraries (xrpl_syslibs
INTERFACE INTERFACE
$<$<BOOL:${MSVC}>: $<$<BOOL:${MSVC}>:
legacy_stdio_definitions.lib legacy_stdio_definitions.lib
@@ -89,9 +89,9 @@ target_link_libraries (ripple_syslibs
if (NOT MSVC) if (NOT MSVC)
set (THREADS_PREFER_PTHREAD_FLAG ON) set (THREADS_PREFER_PTHREAD_FLAG ON)
find_package (Threads) find_package (Threads)
target_link_libraries (ripple_syslibs INTERFACE Threads::Threads) target_link_libraries (xrpl_syslibs INTERFACE Threads::Threads)
endif () endif ()
add_library (ripple_libs INTERFACE) add_library (xrpl_libs INTERFACE)
add_library (Ripple::libs ALIAS ripple_libs) add_library (Xrpl::libs ALIAS xrpl_libs)
target_link_libraries (ripple_libs INTERFACE Ripple::syslibs) target_link_libraries (xrpl_libs INTERFACE Xrpl::syslibs)

View File

@@ -61,8 +61,8 @@ if (MSVC AND CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
endif () endif ()
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
message (FATAL_ERROR "Rippled requires a 64 bit target architecture.\n" message (FATAL_ERROR "Xrpld requires a 64 bit target architecture.\n"
"The most likely cause of this warning is trying to build rippled with a 32-bit OS.") "The most likely cause of this warning is trying to build xrpld with a 32-bit OS.")
endif () endif ()
if (APPLE AND NOT HOMEBREW) if (APPLE AND NOT HOMEBREW)

View File

@@ -49,7 +49,7 @@ else()
set(wextra OFF CACHE BOOL "gcc/clang only" FORCE) set(wextra OFF CACHE BOOL "gcc/clang only" FORCE)
endif() endif()
if(is_linux) if(is_linux)
option(BUILD_SHARED_LIBS "build shared ripple libraries" OFF) option(BUILD_SHARED_LIBS "build shared xrpl libraries" OFF)
option(static "link protobuf, openssl, libc++, and boost statically" ON) option(static "link protobuf, openssl, libc++, and boost statically" ON)
option(perf "Enables flags that assist with perf recording" OFF) option(perf "Enables flags that assist with perf recording" OFF)
option(use_gold "enables detection of gold (binutils) linker" ON) option(use_gold "enables detection of gold (binutils) linker" ON)
@@ -58,7 +58,7 @@ else()
# we are not ready to allow shared-libs on windows because it would require # we are not ready to allow shared-libs on windows because it would require
# export declarations. On macos it's more feasible, but static openssl # export declarations. On macos it's more feasible, but static openssl
# produces odd linker errors, thus we disable shared lib builds for now. # produces odd linker errors, thus we disable shared lib builds for now.
set(BUILD_SHARED_LIBS OFF CACHE BOOL "build shared ripple libraries - OFF for win/macos" FORCE) set(BUILD_SHARED_LIBS OFF CACHE BOOL "build shared xrpl libraries - OFF for win/macos" FORCE)
set(static ON CACHE BOOL "static link, linux only. ON for WIN/macos" FORCE) set(static ON CACHE BOOL "static link, linux only. ON for WIN/macos" FORCE)
set(perf OFF CACHE BOOL "perf flags, linux only" FORCE) set(perf OFF CACHE BOOL "perf flags, linux only" FORCE)
set(use_gold OFF CACHE BOOL "gold linker, linux only" FORCE) set(use_gold OFF CACHE BOOL "gold linker, linux only" FORCE)

View File

@@ -10,7 +10,7 @@ if (validator_keys)
FetchContent_Declare ( FetchContent_Declare (
validator_keys validator_keys
GIT_REPOSITORY https://github.com/ripple/validator-keys-tool.git GIT_REPOSITORY https://github.com/xrpl/validator-keys-tool.git
GIT_TAG "${current_branch}" GIT_TAG "${current_branch}"
) )
FetchContent_MakeAvailable(validator_keys) FetchContent_MakeAvailable(validator_keys)

View File

@@ -5,11 +5,11 @@
file(STRINGS src/libxrpl/protocol/BuildInfo.cpp BUILD_INFO) file(STRINGS src/libxrpl/protocol/BuildInfo.cpp BUILD_INFO)
foreach(line_ ${BUILD_INFO}) foreach(line_ ${BUILD_INFO})
if(line_ MATCHES "versionString[ ]*=[ ]*\"(.+)\"") if(line_ MATCHES "versionString[ ]*=[ ]*\"(.+)\"")
set(rippled_version ${CMAKE_MATCH_1}) set(xrpld_version ${CMAKE_MATCH_1})
endif() endif()
endforeach() endforeach()
if(rippled_version) if(xrpld_version)
message(STATUS "rippled version: ${rippled_version}") message(STATUS "xrpld version: ${xrpld_version}")
else() else()
message(FATAL_ERROR "unable to determine rippled version") message(FATAL_ERROR "unable to determine xrpld version")
endif() endif()

View File

@@ -12,10 +12,10 @@ find_package(Boost 1.82 REQUIRED
thread thread
) )
add_library(ripple_boost INTERFACE) add_library(xrpl_boost INTERFACE)
add_library(Ripple::boost ALIAS ripple_boost) add_library(Xrpl::boost ALIAS xrpl_boost)
target_link_libraries(ripple_boost target_link_libraries(xrpl_boost
INTERFACE INTERFACE
Boost::headers Boost::headers
Boost::chrono Boost::chrono
@@ -30,7 +30,7 @@ target_link_libraries(ripple_boost
Boost::system Boost::system
Boost::thread) Boost::thread)
if(Boost_COMPILER) if(Boost_COMPILER)
target_link_libraries(ripple_boost INTERFACE Boost::disable_autolinking) target_link_libraries(xrpl_boost INTERFACE Boost::disable_autolinking)
endif() endif()
if(san AND is_clang) if(san AND is_clang)
# TODO: gcc does not support -fsanitize-blacklist...can we do something else # TODO: gcc does not support -fsanitize-blacklist...can we do something else

View File

@@ -12,6 +12,6 @@
#undef TYPE_BOOL #undef TYPE_BOOL
#endif #endif
#include <xrpl/proto/ripple.pb.h> #include <xrpl/proto/xrpl.pb.h>
#endif #endif

View File

@@ -1,4 +1,4 @@
include(xrpl_add_test) include(XrplAddTest)
# Test requirements. # Test requirements.
find_package(doctest REQUIRED) find_package(doctest REQUIRED)