Skip to content

Commit f38860a

Browse files
committed
[CMAKE] Add RTS_DEBUG_CRC cmake option
1 parent 8f2c9e9 commit f38860a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Generals/Code/GameEngine/Include/Common/CRCDebug.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333

3434
#include "Common/Debug.h"
3535

36-
#ifndef NO_DEBUG_CRC
36+
#ifdef NO_DEBUG_CRC
37+
#undef DEBUG_CRC
38+
#else
3739
#ifdef DEBUG_LOGGING
3840
#define DEBUG_CRC
3941
#endif

GeneralsMD/Code/GameEngine/Include/Common/CRCDebug.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333

3434
#include "Common/Debug.h"
3535

36-
#ifndef NO_DEBUG_CRC
36+
#ifdef NO_DEBUG_CRC
37+
#undef DEBUG_CRC
38+
#else
3739
#ifdef DEBUG_LOGGING
3840
#define DEBUG_CRC
3941
#endif

cmake/config-debug.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ 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)
13+
set(RTS_DEBUG_CRC "DEFAULT" CACHE STRING "Enables debug CRC testing. When DEFAULT, this option is enabled with DEBUG_LOGGING")
14+
set_property(CACHE RTS_DEBUG_CRC PROPERTY STRINGS DEFAULT ON OFF)
15+
16+
option(RTS_DEBUG_INCLUDE_DEBUG_LOG_IN_CRC_LOG "Includes normal debug log in CRC log" OFF)
1417

1518

1619
# Helper macro that handles DEFAULT ON OFF options
@@ -33,6 +36,7 @@ define_debug_option(RTS_DEBUG_LOGGING DEBUG_LOGGING DISABLE_DEBUG_LOGGING
3336
define_debug_option(RTS_DEBUG_CRASHING DEBUG_CRASHING DISABLE_DEBUG_CRASHING DebugCrashing "Build with Debug Crashing")
3437
define_debug_option(RTS_DEBUG_STACKTRACE DEBUG_STACKTRACE DISABLE_DEBUG_STACKTRACE DebugStacktrace "Build with Debug Stacktracing")
3538
define_debug_option(RTS_DEBUG_PROFILE DEBUG_PROFILE DISABLE_DEBUG_PROFILE DebugProfile "Build with Debug Profiling")
39+
define_debug_option(RTS_DEBUG_CRC DEBUG_CRC NO_DEBUG_CRC DebugCRC "Build with Debug CRC Testing")
3640

3741
if(RTS_DEBUG_INCLUDE_DEBUG_LOG_IN_CRC_LOG)
3842
target_compile_definitions(core_config INTERFACE INCLUDE_DEBUG_LOG_IN_CRC_LOG)

0 commit comments

Comments
 (0)