This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 6eb7f608ce775b1b59ea4647ee8e68975f9aa111
Author: Chris McFarlen <[email protected]>
AuthorDate: Mon May 13 16:50:17 2024 -0600

    Fix RelWithDebInfo to be release with debug info (#11211)
    
    * Fix RelWithDebInfo to be release with debug info
    
    * Add comment
    
    (cherry picked from commit a7a150de4603bd39ef010bbc0f004f7fa487f359)
---
 CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 015099a457..96315cfa18 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,10 @@
 #
 #######################
 
+# Adjust default RelWithDebInfo flags to be in line with "Release with Debug".
+# The default RelWithDebInfo uses -O2, but Release uses -O3. This difference 
can be astonishing to users
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
+
 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
   message(FATAL_ERROR "In source builds are disabled.  Use a preset, -B or run 
from a different directory")
 endif()

Reply via email to