From 732d92b6425df3236672c64d9a3b1dcc6dcf5b55 Mon Sep 17 00:00:00 2001 From: yah01 Date: Tue, 15 Aug 2023 14:13:32 +0800 Subject: [PATCH] Add -g flag to compile with debug info (#26354) Signed-off-by: yah01 --- internal/core/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/core/CMakeLists.txt b/internal/core/CMakeLists.txt index 7088b48d3f..3f3930881e 100644 --- a/internal/core/CMakeLists.txt +++ b/internal/core/CMakeLists.txt @@ -46,6 +46,8 @@ else () message(FATAL_ERROR "Unsupported platform!" ) endif () +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") + if (CMAKE_COMPILER_IS_GNUCC) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.99) # ignore deprecated declarations for gcc>=12