cmake/compileroptions.cmake: Fix missing stack options under Cygwin (#2560)

testrunner fails with SEGFAULT when built with cmake under Cygwin.
This fix adds a compiler option to increase the stack size in the same
way as it is already done in the Makefile.
This commit is contained in:
Sebastian 2020-03-03 18:37:49 +01:00 committed by GitHub
parent b61feff125
commit 6e74d6810a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -125,6 +125,10 @@ if (MSVC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:8000000")
endif()
if (CYGWIN)
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wl,--stack,8388608")
endif()
include(cmake/dynamic_analyzer_options.cmake REQUIRED)
# Add user supplied extra options (optimization, etc...)