Always make debuglink .debug in CI

This commit is contained in:
Eidolon 2024-05-16 15:42:04 -05:00
parent a4b254cb27
commit 39823c4508
3 changed files with 4 additions and 2 deletions

View file

@ -92,7 +92,8 @@ Windows x86:
-DCMAKE_CXX_COMPILER_LAUNCHER=$CCACHE \ -DCMAKE_CXX_COMPILER_LAUNCHER=$CCACHE \
-DCMAKE_C_COMPILER=/usr/bin/i686-w64-mingw32-gcc-posix \ -DCMAKE_C_COMPILER=/usr/bin/i686-w64-mingw32-gcc-posix \
-DCMAKE_CXX_COMPILER=/usr/bin/i686-w64-mingw32-g++-posix \ -DCMAKE_CXX_COMPILER=/usr/bin/i686-w64-mingw32-g++-posix \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake \
-DSRB2_CONFIG_ALWAYS_MAKE_DEBUGLINK=ON
- | - |
# cmake # cmake

View file

@ -66,6 +66,7 @@ option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF
option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF) option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF)
option(SRB2_CONFIG_DEBUGMODE "Compile with PARANOIA, ZDEBUG, RANGECHECK and PACKETDROP defined." OFF) option(SRB2_CONFIG_DEBUGMODE "Compile with PARANOIA, ZDEBUG, RANGECHECK and PACKETDROP defined." OFF)
option(SRB2_CONFIG_DEV_BUILD "Compile a development build." OFF) option(SRB2_CONFIG_DEV_BUILD "Compile a development build." OFF)
option(SRB2_CONFIG_ALWAYS_MAKE_DEBUGLINK "Always make a debuglink .debug." OFF)
option(SRB2_CONFIG_TESTERS "Compile a build for testers." OFF) option(SRB2_CONFIG_TESTERS "Compile a build for testers." OFF)
option(SRB2_CONFIG_MOBJCONSISTANCY "Compile with MOBJCONSISTANCY defined." OFF) option(SRB2_CONFIG_MOBJCONSISTANCY "Compile with MOBJCONSISTANCY defined." OFF)
option(SRB2_CONFIG_PACKETDROP "Compile with PACKETDROP defined." OFF) option(SRB2_CONFIG_PACKETDROP "Compile with PACKETDROP defined." OFF)

View file

@ -611,7 +611,7 @@ add_subdirectory(modp_b64)
# strip debug symbols into separate file when using gcc. # strip debug symbols into separate file when using gcc.
# to be consistent with Makefile, don't generate for OS X. # to be consistent with Makefile, don't generate for OS X.
if((CMAKE_COMPILER_IS_GNUCC) AND NOT ("${CMAKE_SYSTEM_NAME}" MATCHES Darwin)) if((CMAKE_COMPILER_IS_GNUCC) AND NOT ("${CMAKE_SYSTEM_NAME}" MATCHES Darwin))
if(${CMAKE_BUILD_TYPE} MATCHES RelWithDebInfo) if(${CMAKE_BUILD_TYPE} MATCHES RelWithDebInfo OR SRB2_CONFIG_ALWAYS_MAKE_DEBUGLINK)
message(STATUS "Will make separate debug symbols in *.debug") message(STATUS "Will make separate debug symbols in *.debug")
add_custom_command(TARGET SRB2SDL2 POST_BUILD add_custom_command(TARGET SRB2SDL2 POST_BUILD
COMMAND ${OBJCOPY} ${OBJCOPY_ONLY_KEEP_DEBUG} $<TARGET_FILE:SRB2SDL2> $<TARGET_FILE:SRB2SDL2>.debug COMMAND ${OBJCOPY} ${OBJCOPY_ONLY_KEEP_DEBUG} $<TARGET_FILE:SRB2SDL2> $<TARGET_FILE:SRB2SDL2>.debug