Browse Source

cmake: Reduce default recursion depth when compiling with IntelLLVM

This compiler makes stack frames large enough (at least in Debug
builds) that CMake language recursion to depth 1000 overflows the
stack.  Reduce the limit for this compiler.
Brad King 4 years ago
parent
commit
32498d0665
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Source/CMakeLists.txt

+ 2 - 0
Source/CMakeLists.txt

@@ -46,6 +46,8 @@ if(NOT CMake_DEFAULT_RECURSION_LIMIT)
     set(CMake_DEFAULT_RECURSION_LIMIT 100)
   elseif(MINGW)
     set(CMake_DEFAULT_RECURSION_LIMIT 400)
+  elseif(WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM")
+    set(CMake_DEFAULT_RECURSION_LIMIT 600)
   else()
     set(CMake_DEFAULT_RECURSION_LIMIT 1000)
   endif()