From c68ebee9c23f6278baae592e87d145596ca84f7b Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 8 Mar 2023 11:55:31 -0500 Subject: 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 --- Source/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index e99da49296..163dab3beb 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() -- cgit v1.2.1