diff options
author | Brad King <brad.king@kitware.com> | 2023-03-08 16:55:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-08 16:56:44 (GMT) |
commit | c68ebee9c23f6278baae592e87d145596ca84f7b (patch) | |
tree | 1e622918375966e756fabb41de1d44824cca4508 /Source/CMakeLists.txt | |
parent | 7fed8f8016beec13c7b61ef5f859a893f3b1594c (diff) | |
download | CMake-c68ebee9c23f6278baae592e87d145596ca84f7b.zip CMake-c68ebee9c23f6278baae592e87d145596ca84f7b.tar.gz CMake-c68ebee9c23f6278baae592e87d145596ca84f7b.tar.bz2 |
cmake: Reduce default recursion depth when compiling for Windows ARM64
On Windows ARM64 the stack frames are large enough (at least in Debug
builds) that CMake language recursion to depth 1000 overflows the stack.
Reduce the limit for this compiler.
Suggested-by: Bill Hoffman <bill.hoffman@kitware.com>
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r-- | Source/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index e99da49..163dab3 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -16,6 +16,8 @@ if(NOT CMake_DEFAULT_RECURSION_LIMIT) set(CMake_DEFAULT_RECURSION_LIMIT 100) elseif(MINGW OR MSYS) set(CMake_DEFAULT_RECURSION_LIMIT 400) + elseif(WIN32 AND CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64") + set(CMake_DEFAULT_RECURSION_LIMIT 400) elseif(WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM") set(CMake_DEFAULT_RECURSION_LIMIT 600) else() |