build(cmake): Add output name settings for Generals and Zero Hour executables#2378
build(cmake): Add output name settings for Generals and Zero Hour executables#2378tintinhamans wants to merge 1 commit intoTheSuperHackers:mainfrom
Conversation
|
| Filename | Overview |
|---|---|
| cmake/config-build.cmake | Added cache variables for customizable output names (generalszh, generalsv) with proper scoping inside conditional blocks |
| Generals/Code/Main/CMakeLists.txt | Removed redundant if-else block and replaced with configurable OUTPUT_NAME variable, updated comment to reflect variable usage |
| GeneralsMD/Code/Main/CMakeLists.txt | Removed redundant if-else block and replaced with configurable OUTPUT_NAME variable, updated comment to reflect variable usage |
Last reviewed commit: 1c82474
Additional Comments (2)
This comment still references the default output name Prompt To Fix With AIThis is a comment left during a code review.
Path: Generals/Code/Main/CMakeLists.txt
Line: 87
Comment:
**Stale hardcoded filename in comment**
This comment still references the default output name `generalsv` directly. If a user overrides `RTS_BUILD_GENERALS_OUTPUT_NAME` at configure time, the actual debug file will have a different name, making this comment misleading.
```suggestion
# This creates ${RTS_BUILD_GENERALS_OUTPUT_NAME}.exe.debug (similar to MSVC .pdb files)
```
How can I resolve this? If you propose a fix, please make it concise.
This comment still references the default output name Prompt To Fix With AIThis is a comment left during a code review.
Path: GeneralsMD/Code/Main/CMakeLists.txt
Line: 76
Comment:
**Stale hardcoded filename in comment**
This comment still references the default output name `generalszh` directly. If a user overrides `RTS_BUILD_ZEROHOUR_OUTPUT_NAME` at configure time, the actual debug file will have a different name, making this comment misleading.
```suggestion
# This creates ${RTS_BUILD_ZEROHOUR_OUTPUT_NAME}.exe.debug (similar to MSVC .pdb files)
```
How can I resolve this? If you propose a fix, please make it concise. |
…cutables Signed-off-by: tintinhamans <5984296+tintinhamans@users.noreply.github.com>
862861a to
1c82474
Compare
This pull request improves the flexibility of the build system by allowing the output binary names for the Generals and Zero Hour executables to be customized at configure time - this can be helpful if you have multiple worktrees and want to use the install target.
This is achieved by introducing new CMake cache variables, making it easier to override the default output names without modifying the build scripts directly.
Build system improvements:
RTS_BUILD_ZEROHOUR_OUTPUT_NAMEandRTS_BUILD_GENERALS_OUTPUT_NAMECMake cache variables with default values (generalszhandgeneralsvrespectively) to allow customizable output binary names for Zero Hour and Generals executables. (cmake/config-build.cmake).