mirror of
				https://github.com/Xahau/xahaud.git
				synced 2025-11-04 10:45:50 +00:00 
			
		
		
		
	feat(logs): add -DBEAST_ENHANCED_LOGGING with file:line numbers for JLOG macro (#552)
This commit is contained in:
		@@ -33,6 +33,25 @@ if(Git_FOUND)
 | 
			
		||||
    endif()
 | 
			
		||||
endif() #git
 | 
			
		||||
 | 
			
		||||
# make SOURCE_ROOT_PATH define available for logging
 | 
			
		||||
set(SOURCE_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/src/")
 | 
			
		||||
add_definitions(-DSOURCE_ROOT_PATH="${SOURCE_ROOT_PATH}")
 | 
			
		||||
 | 
			
		||||
# BEAST_ENHANCED_LOGGING option - adds file:line numbers and formatting to logs
 | 
			
		||||
# 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)
 | 
			
		||||
else()
 | 
			
		||||
    option(BEAST_ENHANCED_LOGGING "Include file and line numbers in log messages" OFF)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(BEAST_ENHANCED_LOGGING)
 | 
			
		||||
    add_definitions(-DBEAST_ENHANCED_LOGGING=1)
 | 
			
		||||
    message(STATUS "Log line numbers enabled")
 | 
			
		||||
else()
 | 
			
		||||
    message(STATUS "Log line numbers disabled")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(thread_safety_analysis)
 | 
			
		||||
  add_compile_options(-Wthread-safety -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -DRIPPLE_ENABLE_THREAD_SAFETY_ANNOTATIONS)
 | 
			
		||||
  add_compile_options("-stdlib=libc++")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user