Skip to content

Commit 6e97df7

Browse files
authored
Add CMAKE support for MAX_STACK_ALLOC setting
1 parent dd7a650 commit 6e97df7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

cmake/system.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,14 @@ if (USE_SIMPLE_THREADED_LEVEL3)
297297
set(CCOMMON_OPT "${CCOMMON_OPT} -DUSE_SIMPLE_THREADED_LEVEL3")
298298
endif ()
299299

300+
if (DEFINED MAX_STACK_ALLOC)
301+
if (NOT ${MAX_STACK_ALLOC} EQUAL 0)
302+
set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=${MAX_STACK_ALLOC}")
303+
endif ()
304+
else ()
305+
set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=2048")
306+
endif ()
307+
300308
if (DEFINED LIBNAMESUFFIX)
301309
set(LIBPREFIX "libopenblas_${LIBNAMESUFFIX}")
302310
else ()

0 commit comments

Comments
 (0)