mirror of
https://github.com/XRPLF/rippled.git
synced 2026-02-09 16:32:36 +00:00
This change adds `cmake-format` as. a pre-commit hook. The style file closely matches that in Clio, and they will be made to be equivalent over time. For now, some files have been excluded, as those need some manual adjustments, which will be done in future changes.
16 lines
539 B
CMake
16 lines
539 B
CMake
#[===================================================================[
|
|
read version from source
|
|
#]===================================================================]
|
|
|
|
file(STRINGS src/libxrpl/protocol/BuildInfo.cpp BUILD_INFO)
|
|
foreach (line_ ${BUILD_INFO})
|
|
if (line_ MATCHES "versionString[ ]*=[ ]*\"(.+)\"")
|
|
set(xrpld_version ${CMAKE_MATCH_1})
|
|
endif ()
|
|
endforeach ()
|
|
if (xrpld_version)
|
|
message(STATUS "xrpld version: ${xrpld_version}")
|
|
else ()
|
|
message(FATAL_ERROR "unable to determine xrpld version")
|
|
endif ()
|