[build] Also compress debug info for CMake RelWithDebInfo build type (#5638)

This commit is contained in:
Tyler Veness
2023-09-15 10:36:39 -07:00
committed by GitHub
parent 205a40c895
commit e7e927fe26

View File

@@ -14,7 +14,9 @@ macro(wpilib_target_warnings target)
endif()
# Compress debug info with GCC
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
if ((${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR
${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo") AND
${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
target_compile_options(${target} PRIVATE -gz=zlib)
endif()
endmacro()