mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 12:13:18 +00:00
CMake: use -O0 in debug mode
Otherwise, GCC optimizes variables away and gdb can't tell us what's in them. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
This commit is contained in:
parent
28c1451a7c
commit
4ce16ed82f
@ -65,6 +65,7 @@ IF (MSVC)
|
||||
SET(WIN_RC "src/win32/git2.rc")
|
||||
ELSE ()
|
||||
SET(CMAKE_C_FLAGS "-O2 -g -Wall -Wextra -Wstrict-aliasing=2 -Wstrict-prototypes -Wmissing-prototypes ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
|
||||
IF (NOT MINGW) # MinGW always does PIC and complains if we tell it to
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||
ENDIF ()
|
||||
|
Loading…
Reference in New Issue
Block a user