mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix MinGW build by temporarily disabling FORTIFY_SOURCE (fixes #2001)
This commit is contained in:
parent
a7deac1b22
commit
fbbf7b3929
|
@ -1601,7 +1601,11 @@ foreach(target ${TARGETS})
|
|||
target_compile_options(${target} PRIVATE ${OUR_FLAGS})
|
||||
endif()
|
||||
if(DEFINE_FORTIFY_SOURCE)
|
||||
target_compile_definitions(${target} PRIVATE $<$<NOT:$<CONFIG:Debug>>:_FORTIFY_SOURCE=2>) # Detect some buffer overflows.
|
||||
if(MINGW)
|
||||
target_compile_definitions(${target} PRIVATE $<$<NOT:$<CONFIG:Debug>>:_FORTIFY_SOURCE=0>) # Currently broken in MinGW, see https://sourceforge.net/p/mingw-w64/discussion/723798/thread/b9d24f041f/
|
||||
else()
|
||||
target_compile_definitions(${target} PRIVATE $<$<NOT:$<CONFIG:Debug>>:_FORTIFY_SOURCE=2>) # Detect some buffer overflows.
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
|
Loading…
Reference in a new issue