From f333ae4c110afc182c65be7378db50f3f7fd483d Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Mon, 9 Mar 2026 19:22:57 +0000 Subject: [PATCH] Fix gersemi cmake formatting (if/endif spacing, target_link_libraries wrapping) Co-Authored-By: Claude Opus 4.6 --- CMakeLists.txt | 4 ++-- cmake/XrplCore.cmake | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 584c373bbc..437e232556 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,11 +123,11 @@ endif() # When OFF (default), all tracing code compiles to no-ops with zero overhead. # Enable via: conan install -o telemetry=True, or cmake -Dtelemetry=ON. option(telemetry "Enable OpenTelemetry tracing" OFF) -if (telemetry) +if(telemetry) find_package(opentelemetry-cpp CONFIG REQUIRED) add_compile_definitions(XRPL_ENABLE_TELEMETRY) message(STATUS "OpenTelemetry tracing enabled") -endif () +endif() # Work around changes to Conan recipe for now. if(TARGET nudb::core) diff --git a/cmake/XrplCore.cmake b/cmake/XrplCore.cmake index d9df4023bc..3942f5715b 100644 --- a/cmake/XrplCore.cmake +++ b/cmake/XrplCore.cmake @@ -186,10 +186,16 @@ target_link_libraries(xrpl.libxrpl.tx PUBLIC xrpl.libxrpl.ledger) # opentelemetry-cpp::opentelemetry-cpp (individual component targets like # ::api, ::sdk are not available in the Conan package). add_module(xrpl telemetry) -target_link_libraries(xrpl.libxrpl.telemetry PUBLIC xrpl.libxrpl.basics xrpl.libxrpl.beast) -if (telemetry) - target_link_libraries(xrpl.libxrpl.telemetry PUBLIC opentelemetry-cpp::opentelemetry-cpp) -endif () +target_link_libraries( + xrpl.libxrpl.telemetry + PUBLIC xrpl.libxrpl.basics xrpl.libxrpl.beast +) +if(telemetry) + target_link_libraries( + xrpl.libxrpl.telemetry + PUBLIC opentelemetry-cpp::opentelemetry-cpp + ) +endif() add_library(xrpl.libxrpl) set_target_properties(xrpl.libxrpl PROPERTIES OUTPUT_NAME xrpl)