build(cmake): Add retail compatibility option in CMake config - #2379
build(cmake): Add retail compatibility option in CMake config#2379tintinhamans wants to merge 2 commits into
Conversation
|
| Filename | Overview |
|---|---|
| cmake/config-build.cmake | Adds and advertises the retail-compatibility option, applying opt-out compile definitions through the shared interface configuration target. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Option[RTS_BUILD_OPTION_RETAIL_COMPATIBLE_GAME] --> Enabled{Enabled?}
Enabled -->|Yes| Defaults[Use retail-compatible header defaults]
Enabled -->|No| CoreConfig[Set compatibility macros to 0 on core_config]
CoreConfig --> Shared[Shared Core target configuration]
Shared --> Generals[Generals targets]
Shared --> ZeroHour[GeneralsMD targets]
Reviews (2): Last reviewed commit: "build(cmake): Group retail compatibility..." | Re-trigger Greptile
|
Looks good to me, is there a reason we're not just adding ALL of the gamedefines macros? eg USE_BUFFERED_IO, USE_OBSOLETE_GENERALS_CODE, TELL_COMPUTER_IDENTITY_IN_LAN_LOBBY. Also, maybe it's pedantic, but RTS_BUILD_OPTION_RETAIL_COMPATIBLE_PATHFINDING_ALLOCATION is probably a CMakeDependentOption of RTS_BUILD_OPTION_RETAIL_COMPATIBLE_PATHFINDING. Not needed though, this works as is. |
|
Should we revive this one? Are we using RTS_BUILD_OPTION_RETAIL_COMPATIBLE_GAME? adding ALL of the gamedefines macros? If the individual switches remain, PATHFINDING_ALLOCATION should be dependent on PATHFINDING, and CI should compile at least one non-default configuration. |
…nfig-build.cmake Signed-off-by: tintinhamans <5984296+tintinhamans@users.noreply.github.com>
b3fca3b to
00cb6c5
Compare
|
Revived and simplified this based on the feedback. The individual switches have been replaced with a single I realized I didn't need to define every |
|
Should we have at least one of the RTS_BUILD_OPTION_RETAIL_COMPATIBLE_GAME set to OFF for ci? |
Was planning on doing that in a follow-up PR. |
| option(RTS_BUILD_OPTION_ASAN "Build code with Address Sanitizer." OFF) | ||
| option(RTS_BUILD_OPTION_VC6_FULL_DEBUG "Build VC6 with full debug info." OFF) | ||
| option(RTS_BUILD_OPTION_FFMPEG "Enable FFmpeg support" OFF) | ||
| option(RTS_BUILD_OPTION_RETAIL_COMPATIBLE_GAME "Build with retail-compatible game logic." ON) |
There was a problem hiding this comment.
Can clarify that disabling this will make the game benefit from the full wrath of fixes.
|
Has unaddressed comments. Needs rebase |
This pull request adds
RTS_BUILD_OPTION_RETAIL_COMPATIBLE_GAMEconfiguration option tocmake/config-build.cmaketo make it easier to build retail or non-retail.Will eventually be used for #2322