mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-11 12:09:07 +00:00
Compile with _GNU_SOURCE when appropriate
On non-Windows builds, we will now use _GNU_SOURCE so header files will include modern API extensions. This should resolve issue #547.
This commit is contained in:
parent
e8c96ed2a7
commit
38691ffc67
@ -65,7 +65,7 @@ IF (MSVC)
|
||||
SET(CMAKE_C_FLAGS_RELEASE "/MT /O2")
|
||||
SET(WIN_RC "src/win32/git2.rc")
|
||||
ELSE ()
|
||||
SET(CMAKE_C_FLAGS "-O2 -g -Wall -Wextra -Wno-missing-field-initializers -Wstrict-aliasing=2 -Wstrict-prototypes -Wmissing-prototypes ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_C_FLAGS "-O2 -g -D_GNU_SOURCE -Wall -Wextra -Wno-missing-field-initializers -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")
|
||||
|
Loading…
Reference in New Issue
Block a user