From c7cee1a11e1c18b48d026dfae9fc8a9ddcfa238f Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 30 Jan 2018 14:37:23 -0500 Subject: Windows: Increase stack size used by CMake binaries Deep regex matching logic can exceed the default 1MB stack size. Until a better regex engine is used, simply push the problem over a farther horizon by increasing the stack size when built using a MSVC-compatible linker. Issue: #17659 --- CompileFlags.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CompileFlags.cmake b/CompileFlags.cmake index 9834b04..32e7005 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -17,6 +17,10 @@ if(MSVC OR _INTEL_WINDOWS) else() endif() +if(MSVC) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stack:10000000") +endif() + #silence duplicate symbol warnings on AIX if(CMAKE_SYSTEM_NAME MATCHES "AIX") if(NOT CMAKE_COMPILER_IS_GNUCXX) -- cgit v0.12