Skip to content

Commit c26a4fa

Browse files
committed
Add RTS_DEBUG_INCLUDE_DEBUG_LOG_IN_CRC_LOG option (again)
1 parent 6fdf9ed commit c26a4fa

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
// Uncomment this to show normal logging stuff in the crc logging.
5353
// This can be helpful for context, but can also clutter diffs because normal logs arn't necessarily
5454
// deterministic or the same on all peers in multiplayer games.
55-
//#define NORMAL_LOG_IN_CRC_LOG
55+
//#define INCLUDE_DEBUG_LOG_IN_CRC_LOG
5656

5757
#define DEBUG_THREADSAFE
5858
#ifdef DEBUG_THREADSAFE
@@ -246,7 +246,7 @@ static void doLogOutput(const char *buffer)
246246
::OutputDebugString(buffer);
247247
}
248248

249-
#ifdef NORMAL_LOG_IN_CRC_LOG
249+
#ifdef INCLUDE_DEBUG_LOG_IN_CRC_LOG
250250
addCRCDebugLineNoCounter("%s", buffer);
251251
#endif
252252
}

cmake/config-debug.cmake

+6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ set_property(CACHE RTS_DEBUG_STACKTRACE PROPERTY STRINGS DEFAULT ON OFF)
1010
set(RTS_DEBUG_PROFILE "DEFAULT" CACHE STRING "Enables debug profiling. When DEFAULT, this option is enabled with DEBUG or INTERNAL")
1111
set_property(CACHE RTS_DEBUG_PROFILE PROPERTY STRINGS DEFAULT ON OFF)
1212

13+
option(RTS_DEBUG_INCLUDE_DEBUG_LOG_IN_CRC_LOG "Include normal debug log in crc log" OFF)
1314

1415

1516
add_feature_info(DebugLogging RTS_DEBUG_LOGGING "Build with Debug Logging")
1617
add_feature_info(DebugCrashing RTS_DEBUG_CRASHING "Build with Debug Crashing")
1718
add_feature_info(DebugStacktrace RTS_DEBUG_STACKTRACE "Build with Debug Stacktracing")
1819
add_feature_info(DebugProfile RTS_DEBUG_PROFILE "Build with Debug Profiling")
20+
add_feature_info(DebugIncludeDebugLogInCrcLog RTS_DEBUG_INCLUDE_DEBUG_LOG_IN_CRC_LOG "Include debug logs in crc logs")
1921

2022

2123
# Helper macro that handles DEFAULT ON OFF options
@@ -36,3 +38,7 @@ define_debug_option(RTS_DEBUG_LOGGING DEBUG_LOGGING DISABLE_DEBUG_LOGGING
3638
define_debug_option(RTS_DEBUG_CRASHING DEBUG_CRASHING DISABLE_DEBUG_CRASHING )
3739
define_debug_option(RTS_DEBUG_STACKTRACE DEBUG_STACKTRACE DISABLE_DEBUG_STACKTRACE)
3840
define_debug_option(RTS_DEBUG_PROFILE DEBUG_PROFILE DISABLE_DEBUG_PROFILE )
41+
42+
if(RTS_DEBUG_INCLUDE_DEBUG_LOG_IN_CRC_LOG)
43+
target_compile_definitions(core_config INTERFACE INCLUDE_DEBUG_LOG_IN_CRC_LOG)
44+
endif()

0 commit comments

Comments
 (0)