
In order to keep infinitely-recursive scripts from causing a stack overflow in the CMake executable, CMake now imposes a maximum recursion limit before issuing an error message. The limit can be adjusted at runtime with CMAKE_MAXIMUM_RECURSION_DEPTH. Fixes: #18694
8 lines
106 B
CMake
8 lines
106 B
CMake
macro(recursive x)
|
|
message("${x}")
|
|
math(EXPR y "${x} + 1")
|
|
recursive(${y})
|
|
endmacro()
|
|
|
|
recursive(3)
|