Skip to content

Commit

Permalink
Enable -g1 in CMake release build to produce source and line number i…
Browse files Browse the repository at this point in the history
…n stack trace (#64705)
  • Loading branch information
Qrox authored and olanti-p committed Oct 17, 2023
1 parent 2b27eb4 commit 9a20248
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ if (NOT MSVC)
if (NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
set(CATA_WARNINGS "${CATA_WARNINGS} -Wredundant-decls")
endif ()
set(CATA_OTHER_FLAGS "${CATA_OTHER_FLAGS} -fsigned-char")
set(CATA_OTHER_FLAGS "${CATA_OTHER_FLAGS} -fsigned-char -g1")
# Compact the whitespace in the warning string
string(REGEX REPLACE "[\t ]+" " " CATA_WARNINGS "${CATA_WARNINGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CATA_WARNINGS} ${CATA_OTHER_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g2")
endif ()

set(CMAKE_CXX_STANDARD 17)
Expand Down

0 comments on commit 9a20248

Please sign in to comment.