Add -g flag to compile with debug info (#26354)

Signed-off-by: yah01 <yah2er0ne@outlook.com>
This commit is contained in:
yah01 2023-08-15 14:13:32 +08:00 committed by GitHub
parent 7d61355ab0
commit 732d92b642
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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