Add CMAKE support for MAX_STACK_ALLOC setting
@@ -297,6 +297,14 @@ if (USE_SIMPLE_THREADED_LEVEL3)
set(CCOMMON_OPT "${CCOMMON_OPT} -DUSE_SIMPLE_THREADED_LEVEL3")
endif ()
+if (DEFINED MAX_STACK_ALLOC)
+if (NOT ${MAX_STACK_ALLOC} EQUAL 0)
+set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=${MAX_STACK_ALLOC}")
+endif ()
+else ()
+set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=2048")
+endif ()
+
if (DEFINED LIBNAMESUFFIX)
set(LIBPREFIX "libopenblas_${LIBNAMESUFFIX}")
else ()
