From e7e927fe263024f23a6079a35ddfb1bb9349960d Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Fri, 15 Sep 2023 10:36:39 -0700 Subject: [PATCH] [build] Also compress debug info for CMake RelWithDebInfo build type (#5638) --- cmake/modules/CompileWarnings.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/modules/CompileWarnings.cmake b/cmake/modules/CompileWarnings.cmake index 54c7fce9f8..2d49ba9852 100644 --- a/cmake/modules/CompileWarnings.cmake +++ b/cmake/modules/CompileWarnings.cmake @@ -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()