From 6e74d6810a1cd4fa37af04fcf7af98d1b2c0d8e0 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 3 Mar 2020 18:37:49 +0100 Subject: [PATCH] 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. --- cmake/compileroptions.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/compileroptions.cmake b/cmake/compileroptions.cmake index 17c8c287f..e5348ccd4 100644 --- a/cmake/compileroptions.cmake +++ b/cmake/compileroptions.cmake @@ -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...)