build: only increase stack size in non-debug builds
Signed-off-by: Lenny McLennington <lenny@sneed.church>
This commit is contained in:
parent
22fb301d88
commit
90bbde3631
@ -34,7 +34,10 @@ set(CMAKE_C_STANDARD 11)
|
||||
include(GenerateExportHeader)
|
||||
set(CMAKE_CXX_FLAGS "-Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
if(WIN32)
|
||||
# Increases the stack size to 8MB for Windows, only when not building in Debug mode
|
||||
# because we don't want random users being affected by stack overflows in release builds,
|
||||
# but it's fine in debug builds for finding and fixing them
|
||||
if((NOT CMAKE_BUILD_TYPE STREQUAL "Debug") AND WIN32)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--stack,8388608 ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user