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
9 changes: 7 additions & 2 deletions cmake/compilers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ if (NOT IS_VS6_BUILD)
add_compile_options(/Zc:__cplusplus)
endif()
else()
# Define two pools: 'compile' with plenty of slots, 'link' with just one
set_property(GLOBAL PROPERTY JOB_POOLS compile=0 link=1)
if(RTS_BUILD_OPTION_VC6_FULL_DEBUG)
set_property(GLOBAL PROPERTY JOB_POOLS compile=1 link=1)
else()
# Define two pools: 'compile' with plenty of slots, 'link' with just one
set_property(GLOBAL PROPERTY JOB_POOLS compile=0 link=1)
endif()

# Tell CMake that all compile steps go into 'compile'
set(CMAKE_JOB_POOL_COMPILE compile)
# and all link steps go into 'link' (so only one link ever runs since vc6 can't handle multithreaded linking)
Expand Down
8 changes: 7 additions & 1 deletion cmake/config-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ option(RTS_BUILD_GENERALS "Build Generals code." ON)
option(RTS_BUILD_OPTION_PROFILE "Build code with the \"Profile\" configuration." OFF)
option(RTS_BUILD_OPTION_DEBUG "Build code with the \"Debug\" configuration." OFF)
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)

if(NOT RTS_BUILD_ZEROHOUR AND NOT RTS_BUILD_GENERALS)
Expand All @@ -20,6 +21,7 @@ add_feature_info(GeneralsStuff RTS_BUILD_GENERALS "Build Generals code")
add_feature_info(ProfileBuild RTS_BUILD_OPTION_PROFILE "Building as a \"Profile\" build")
add_feature_info(DebugBuild RTS_BUILD_OPTION_DEBUG "Building as a \"Debug\" build")
add_feature_info(AddressSanitizer RTS_BUILD_OPTION_ASAN "Building with address sanitizer")
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")

if(RTS_BUILD_ZEROHOUR)
Expand Down Expand Up @@ -47,7 +49,11 @@ if(NOT IS_VS6_BUILD)
target_compile_features(core_config INTERFACE cxx_std_20)
endif()

target_compile_options(core_config INTERFACE ${RTS_FLAGS})
if(IS_VS6_BUILD AND RTS_BUILD_OPTION_VC6_FULL_DEBUG)
target_compile_options(core_config INTERFACE ${RTS_FLAGS} /Zi)
else()
target_compile_options(core_config INTERFACE ${RTS_FLAGS})
endif()

# This disables a lot of warnings steering developers to use windows only functions/function names.
if(MSVC)
Expand Down
Loading