1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-05-09 14:57:08 +08:00

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
This commit is contained in:
Brad King 2018-01-30 14:37:23 -05:00
parent 142938225e
commit c7cee1a11e

View File

@ -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)