fix: do not support release builder

This commit is contained in:
Nicholas Dudfield
2025-07-26 18:42:55 +07:00
parent 2225bb4f12
commit 016f908f7e
3 changed files with 13 additions and 6 deletions

View File

@@ -37,11 +37,18 @@ endif() #git
set(SOURCE_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/src/")
add_definitions(-DSOURCE_ROOT_PATH="${SOURCE_ROOT_PATH}")
# BEAST_ENHANCED_LOGGING option - default to ON for Debug builds, OFF for Release
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
option(BEAST_ENHANCED_LOGGING "Include file and line numbers in log messages" ON)
# BEAST_ENHANCED_LOGGING option - only available with Conan builds that have date-tz
# Default to ON for Debug builds, OFF for Release
if(CMAKE_TOOLCHAIN_FILE MATCHES "conan_toolchain")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
option(BEAST_ENHANCED_LOGGING "Include file and line numbers in log messages" ON)
else()
option(BEAST_ENHANCED_LOGGING "Include file and line numbers in log messages" OFF)
endif()
else()
option(BEAST_ENHANCED_LOGGING "Include file and line numbers in log messages" OFF)
# Non-Conan builds don't have date-tz support
set(BEAST_ENHANCED_LOGGING OFF CACHE BOOL "Enhanced logging requires Conan build" FORCE)
message(STATUS "Enhanced logging disabled - requires Conan build for date-tz support")
endif()
if(BEAST_ENHANCED_LOGGING)

View File

@@ -18,13 +18,13 @@
//==============================================================================
#include <date/date.h>
#include <date/tz.h>
#include <ripple/basics/Log.h>
#include <ripple/basics/chrono.h>
#include <ripple/basics/contract.h>
#ifdef BEAST_ENHANCED_LOGGING
#include <ripple/beast/utility/EnhancedLogging.h>
#include <date/tz.h>
#endif
#include <boost/algorithm/string.hpp>
#include <cassert>

View File

@@ -85,4 +85,4 @@ log_write_location_string(std::ostream& os, const char* file, int line);
} // namespace detail
} // namespace beast
#endif
#endif