Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Core/Tools/DebugWindow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows")
DebugWindow.rc
DebugWindow.def
)
set_target_properties(core_debugwindow PROPERTIES OUTPUT_NAME DebugWindow)
set_target_properties(core_debugwindow PROPERTIES OUTPUT_NAME "DebugWindow${RTS_BUILD_OUTPUT_SUFFIX}")
else()
set_target_properties(core_debugwindow PROPERTIES OUTPUT_NAME debugwindow)
set_target_properties(core_debugwindow PROPERTIES OUTPUT_NAME "debugwindow${RTS_BUILD_OUTPUT_SUFFIX}")
endif()
4 changes: 2 additions & 2 deletions Core/Tools/ParticleEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows")
target_link_options(core_particleeditor PRIVATE /NODEFAULTLIB:libci.lib /NODEFAULTLIB:libc.lib)
target_compile_definitions(core_particleeditor PRIVATE _AFXDLL)
target_sources(core_particleeditor PRIVATE ParticleEditor.rc)
set_target_properties(core_particleeditor PROPERTIES OUTPUT_NAME ParticleEditor)
set_target_properties(core_particleeditor PROPERTIES OUTPUT_NAME "ParticleEditor${RTS_BUILD_OUTPUT_SUFFIX}")
else()
set_target_properties(core_particleeditor PROPERTIES OUTPUT_NAME particleeditor)
set_target_properties(core_particleeditor PROPERTIES OUTPUT_NAME "particleeditor${RTS_BUILD_OUTPUT_SUFFIX}")
endif()
6 changes: 3 additions & 3 deletions Generals/Code/Main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ add_executable(g_generals WIN32)

# Use a binary name that doesn't conflict with original game.
if("${CMAKE_SYSTEM}" MATCHES "Windows")
set_target_properties(g_generals PROPERTIES OUTPUT_NAME generalsv)
set_target_properties(g_generals PROPERTIES OUTPUT_NAME "generalsv${RTS_BUILD_OUTPUT_SUFFIX}")
else()
set_target_properties(g_generals PROPERTIES OUTPUT_NAME generalsv)
set_target_properties(g_generals PROPERTIES OUTPUT_NAME "generalsv${RTS_BUILD_OUTPUT_SUFFIX}")
endif()

target_link_libraries(g_generals PRIVATE
Expand Down Expand Up @@ -87,7 +87,7 @@ if(MSVC)
endif()

# Strip debug symbols to separate file for MinGW Release builds
# This creates generalsv.exe.debug (similar to MSVC .pdb files)
# This creates generalsv${RTS_BUILD_OUTPUT_SUFFIX}.exe.debug (similar to MSVC .pdb files)
if(MINGW AND COMMAND add_debug_strip_target)
add_debug_strip_target(g_generals)
endif()
2 changes: 1 addition & 1 deletion Generals/Code/Tools/GUIEdit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ set(GUIEDIT_SRC
)

add_executable(g_guiedit WIN32)
set_target_properties(g_guiedit PROPERTIES OUTPUT_NAME guiedit)
set_target_properties(g_guiedit PROPERTIES OUTPUT_NAME "guiedit${RTS_BUILD_OUTPUT_SUFFIX}")

target_sources(g_guiedit PRIVATE ${GUIEDIT_SRC})

Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/Tools/ImagePacker/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_executable(g_imagepacker WIN32)
set_target_properties(g_imagepacker PROPERTIES OUTPUT_NAME imagepacker)
set_target_properties(g_imagepacker PROPERTIES OUTPUT_NAME "imagepacker${RTS_BUILD_OUTPUT_SUFFIX}")

target_link_libraries(g_imagepacker PRIVATE
corei_imagepacker
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/Tools/MapCacheBuilder/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_executable(g_mapcachebuilder WIN32)
set_target_properties(g_mapcachebuilder PROPERTIES OUTPUT_NAME mapcachebuilder)
set_target_properties(g_mapcachebuilder PROPERTIES OUTPUT_NAME "mapcachebuilder${RTS_BUILD_OUTPUT_SUFFIX}")

target_link_libraries(g_mapcachebuilder PRIVATE
corei_mapcachebuilder
Expand Down
4 changes: 2 additions & 2 deletions Generals/Code/Tools/W3DView/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ target_link_libraries(g_w3dview PRIVATE

if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows")
target_compile_definitions(g_w3dview PRIVATE _AFXDLL)
set_target_properties(g_w3dview PROPERTIES OUTPUT_NAME W3DViewV)
set_target_properties(g_w3dview PROPERTIES OUTPUT_NAME "W3DViewV${RTS_BUILD_OUTPUT_SUFFIX}")
else()
set_target_properties(g_w3dview PROPERTIES OUTPUT_NAME w3dviewv)
set_target_properties(g_w3dview PROPERTIES OUTPUT_NAME "w3dviewv${RTS_BUILD_OUTPUT_SUFFIX}")
endif()
4 changes: 2 additions & 2 deletions Generals/Code/Tools/WorldBuilder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows")
target_link_options(g_worldbuilder PRIVATE /NODEFAULTLIB:libci.lib /NODEFAULTLIB:libc.lib)

target_sources(g_worldbuilder PRIVATE res/WorldBuilder.rc)
set_target_properties(g_worldbuilder PROPERTIES OUTPUT_NAME WorldBuilderV)
set_target_properties(g_worldbuilder PROPERTIES OUTPUT_NAME "WorldBuilderV${RTS_BUILD_OUTPUT_SUFFIX}")
else()
set_target_properties(g_worldbuilder PROPERTIES OUTPUT_NAME worldbuilderv)
set_target_properties(g_worldbuilder PROPERTIES OUTPUT_NAME "worldbuilderv${RTS_BUILD_OUTPUT_SUFFIX}")
endif()

target_sources(g_worldbuilder PRIVATE ${WORLDBUILDER_SRC})
6 changes: 3 additions & 3 deletions GeneralsMD/Code/Main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ add_executable(z_generals WIN32)

# Use a binary name that doesn't conflict with original game.
if("${CMAKE_SYSTEM}" MATCHES "Windows")
set_target_properties(z_generals PROPERTIES OUTPUT_NAME generalszh)
set_target_properties(z_generals PROPERTIES OUTPUT_NAME "generalszh${RTS_BUILD_OUTPUT_SUFFIX}")
else()
set_target_properties(z_generals PROPERTIES OUTPUT_NAME generalszh)
set_target_properties(z_generals PROPERTIES OUTPUT_NAME "generalszh${RTS_BUILD_OUTPUT_SUFFIX}")
endif()

target_link_libraries(z_generals PRIVATE
Expand Down Expand Up @@ -76,7 +76,7 @@ if(MSVC)
endif()

# Strip debug symbols to separate file for MinGW Release builds
# This creates generalszh.exe.debug (similar to MSVC .pdb files)
# This creates generalszh${RTS_BUILD_OUTPUT_SUFFIX}.exe.debug (similar to MSVC .pdb files)
if(MINGW AND COMMAND add_debug_strip_target)
add_debug_strip_target(z_generals)
endif()
2 changes: 1 addition & 1 deletion GeneralsMD/Code/Tools/GUIEdit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ set(GUIEDIT_SRC
)

add_executable(z_guiedit WIN32)
set_target_properties(z_guiedit PROPERTIES OUTPUT_NAME guiedit)
set_target_properties(z_guiedit PROPERTIES OUTPUT_NAME "guiedit${RTS_BUILD_OUTPUT_SUFFIX}")

target_sources(z_guiedit PRIVATE ${GUIEDIT_SRC})

Expand Down
2 changes: 1 addition & 1 deletion GeneralsMD/Code/Tools/ImagePacker/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_executable(z_imagepacker WIN32)
set_target_properties(z_imagepacker PROPERTIES OUTPUT_NAME imagepacker)
set_target_properties(z_imagepacker PROPERTIES OUTPUT_NAME "imagepacker${RTS_BUILD_OUTPUT_SUFFIX}")

target_link_libraries(z_imagepacker PRIVATE
corei_imagepacker
Expand Down
2 changes: 1 addition & 1 deletion GeneralsMD/Code/Tools/MapCacheBuilder/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_executable(z_mapcachebuilder WIN32)
set_target_properties(z_mapcachebuilder PROPERTIES OUTPUT_NAME mapcachebuilder)
set_target_properties(z_mapcachebuilder PROPERTIES OUTPUT_NAME "mapcachebuilder${RTS_BUILD_OUTPUT_SUFFIX}")

target_link_libraries(z_mapcachebuilder PRIVATE
corei_mapcachebuilder
Expand Down
4 changes: 2 additions & 2 deletions GeneralsMD/Code/Tools/W3DView/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ target_link_libraries(z_w3dview PRIVATE

if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows")
target_compile_definitions(z_w3dview PRIVATE _AFXDLL)
set_target_properties(z_w3dview PROPERTIES OUTPUT_NAME W3DViewZH)
set_target_properties(z_w3dview PROPERTIES OUTPUT_NAME "W3DViewZH${RTS_BUILD_OUTPUT_SUFFIX}")
else()
set_target_properties(z_w3dview PROPERTIES OUTPUT_NAME w3dviewzh)
set_target_properties(z_w3dview PROPERTIES OUTPUT_NAME "w3dviewzh${RTS_BUILD_OUTPUT_SUFFIX}")
endif()
4 changes: 2 additions & 2 deletions GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows")
target_link_options(z_worldbuilder PRIVATE /NODEFAULTLIB:libci.lib /NODEFAULTLIB:libc.lib)
target_compile_definitions(z_worldbuilder PRIVATE _AFXDLL)
target_sources(z_worldbuilder PRIVATE res/WorldBuilder.rc)
set_target_properties(z_worldbuilder PROPERTIES OUTPUT_NAME WorldBuilderZH)
set_target_properties(z_worldbuilder PROPERTIES OUTPUT_NAME "WorldBuilderZH${RTS_BUILD_OUTPUT_SUFFIX}")
else()
set_target_properties(z_worldbuilder PROPERTIES OUTPUT_NAME worldbuilderzh)
set_target_properties(z_worldbuilder PROPERTIES OUTPUT_NAME "worldbuilderzh${RTS_BUILD_OUTPUT_SUFFIX}")
endif()
2 changes: 1 addition & 1 deletion GeneralsMD/Code/Tools/wdump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set(WDUMP_SRC
)

add_executable(z_wdump WIN32)
set_target_properties(z_wdump PROPERTIES OUTPUT_NAME wdump)
set_target_properties(z_wdump PROPERTIES OUTPUT_NAME "wdump${RTS_BUILD_OUTPUT_SUFFIX}")

target_sources(z_wdump PRIVATE ${WDUMP_SRC})

Expand Down
2 changes: 2 additions & 0 deletions cmake/config-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ add_feature_info(AddressSanitizer RTS_BUILD_OPTION_ASAN "Building with address s
add_feature_info(Vc6FullDebug RTS_BUILD_OPTION_VC6_FULL_DEBUG "Building VC6 with full debug info")
add_feature_info(FFmpegSupport RTS_BUILD_OPTION_FFMPEG "Building with FFmpeg support")

set(RTS_BUILD_OUTPUT_SUFFIX "" CACHE STRING "Suffix appended to output names of installable targets")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description doesn't match the implementation.

The PR description claims that two separate per-game variables (RTS_BUILD_ZEROHOUR_OUTPUT_NAME and RTS_BUILD_GENERALS_OUTPUT_NAME) are introduced with full name defaults (generalszh and generalsv respectively). However, the actual implementation introduces a single unified RTS_BUILD_OUTPUT_SUFFIX that is appended to all target output names (both main executables and all tool targets across Generals and GeneralsMD).

These two approaches behave differently — separate full-name variables let you rename each game binary independently, while a shared suffix only lets you add the same postfix to every binary. If the intent really is just a suffix for worktree isolation (as described in the motivation), the current implementation is arguably the right call, but the description should be updated to reflect it accurately to avoid confusing future reviewers.

Prompt To Fix With AI
This is a comment left during a code review.
Path: cmake/config-build.cmake
Line: 27

Comment:
PR description doesn't match the implementation.

The PR description claims that two separate per-game variables (`RTS_BUILD_ZEROHOUR_OUTPUT_NAME` and `RTS_BUILD_GENERALS_OUTPUT_NAME`) are introduced with full name defaults (`generalszh` and `generalsv` respectively). However, the actual implementation introduces a single unified `RTS_BUILD_OUTPUT_SUFFIX` that is appended to *all* target output names (both main executables and all tool targets across Generals and GeneralsMD).

These two approaches behave differently — separate full-name variables let you rename each game binary independently, while a shared suffix only lets you add the same postfix to every binary. If the intent really is just a suffix for worktree isolation (as described in the motivation), the current implementation is arguably the right call, but the description should be updated to reflect it accurately to avoid confusing future reviewers.

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@greptileai Updated PR description.


if(RTS_BUILD_ZEROHOUR)
option(RTS_BUILD_ZEROHOUR_TOOLS "Build tools for Zero Hour" ON)
option(RTS_BUILD_ZEROHOUR_EXTRAS "Build extra tools/tests for Zero Hour" OFF)
Expand Down
Loading