-
Notifications
You must be signed in to change notification settings - Fork 151
build(debug): Add CMake option RTS_DEBUG_CHEATS to enable debug cheats in release builds #1842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build(debug): Add CMake option RTS_DEBUG_CHEATS to enable debug cheats in release builds #1842
Conversation
9719cfe to
458b33f
Compare
Greptile Overview
|
| Filename | Overview |
|---|---|
| Core/GameEngine/Include/Common/GameCommon.h | Removed manual DONT_ALLOW_DEBUG_CHEATS_IN_RELEASE define - now controlled by CMake |
| cmake/config-debug.cmake | Added RTS_DEBUG_CHEATS option (OFF by default) that defines _ALLOW_DEBUG_CHEATS_IN_RELEASE when enabled |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant CMake as CMake Build System
participant Config as config-debug.cmake
participant Target as core_config
participant Code as Game Code
Dev->>CMake: cmake -DRTS_DEBUG_CHEATS=OFF (default)
CMake->>Config: Process config-debug.cmake
Config->>Config: Check RTS_DEBUG_CHEATS option
Note over Config: RTS_DEBUG_CHEATS=OFF
Config-->>Target: No _ALLOW_DEBUG_CHEATS_IN_RELEASE defined
Target->>Code: Compile without debug cheats
Note over Code: Debug cheats disabled in release
Dev->>CMake: cmake -DRTS_DEBUG_CHEATS=ON
CMake->>Config: Process config-debug.cmake
Config->>Config: Check RTS_DEBUG_CHEATS option
Note over Config: RTS_DEBUG_CHEATS=ON
Config->>Target: Define _ALLOW_DEBUG_CHEATS_IN_RELEASE
Target->>Code: Compile with debug cheats
Note over Code: Debug cheats enabled in release
xezon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Summary
Implements a CMake option RTS_DEBUG_CHEATS to control debug cheat availability in release builds, replacing the manual DONT_ALLOW_DEBUG_CHEATS_IN_RELEASE define in GameCommon.h.
Usage