mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 23:38:08 +00:00
fix(build): Export XRPL_ENABLE_TELEMETRY to consumers of libxrpl
CMake sets the define with add_compile_definitions, which is scoped to this build, so it reached no consumer. Four public telemetry headers change class layout on it: with the define SpanGuard holds a unique_ptr and its methods are out of line in the library, without it SpanGuard is empty and all-inline. A package compiling against the installed headers therefore built a different SpanGuard than the one it linked. Exporting the define through cpp_info keeps the two in step, and it stays inside the existing telemetry option so the Conan option remains the only switch.
This commit is contained in:
@@ -239,3 +239,7 @@ class Xrpl(ConanFile):
|
||||
libxrpl.requires.append("rocksdb::librocksdb")
|
||||
if self.options.telemetry:
|
||||
libxrpl.requires.append("opentelemetry-cpp::opentelemetry-cpp")
|
||||
# The public telemetry headers pick their class layout on this
|
||||
# define, so a consumer that does not see it compiles a different
|
||||
# SpanGuard than the one inside the library it links.
|
||||
libxrpl.defines.append("XRPL_ENABLE_TELEMETRY")
|
||||
|
||||
Reference in New Issue
Block a user