summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-06-26 15:58:14 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-07-15 11:16:45 +0100
commit18a780778d7fad7a150adecf5cc945e4bbcec003 (patch)
treefaabbb318f158b6c1feb928a71bd4d312fd38098 /CMakeLists.txt
parent0662f6a7f0bfc202ea39fb05e69aebba0b845918 (diff)
cmake: Match MSVC default stack size on MinGW builds.
MSVC defaults to 1MB stack size. MinGW defaults to a larger value. But in order to trap problems with excessive usage of the stack on Windows we really want to match MSVC. Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ae892df9..99d9a8ec3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -264,6 +264,9 @@ else ()
endif ()
if (MINGW)
+ # Match MSVC default stack size
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,1048576")
+
# Avoid depending on MinGW runtime DLLs
check_cxx_compiler_flag (-static-libgcc HAVE_STATIC_LIBGCC_FLAG)
if (HAVE_STATIC_LIBGCC_FLAG)