diff options
author | Brad King <brad.king@kitware.com> | 2018-01-30 14:37:23 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-01-30 14:40:40 -0500 |
commit | c7cee1a11e1c18b48d026dfae9fc8a9ddcfa238f (patch) | |
tree | 1c5d21f7a276761e5afca5f571cb3cae48b107b4 /CompileFlags.cmake | |
parent | 142938225e572d846c956f9b1f54d24a960379ab (diff) | |
download | cmake-c7cee1a11e1c18b48d026dfae9fc8a9ddcfa238f.tar.gz |
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
Diffstat (limited to 'CompileFlags.cmake')
-rw-r--r-- | CompileFlags.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake index 9834b04d8e..32e7005b5d 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) |