make BLAS3_MEM_ALLOC_THRESHOLD configurable on non-Windows
@@ -323,7 +323,13 @@ else ()
set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=2048")
endif ()
endif ()
-
+if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+if (DEFINED BLAS3_MEM_ALLOC_THRESHOLD)
+if (NOT ${BLAS3_MEM_ALLOC_THRESHOLD} EQUAL 32)
+set(CCOMMON_OPT "${CCOMMON_OPT} -DBLAS3_MEM_ALLOC_THRESHOLD=${BLAS3_MEM_ALLOC_THRESHOLD}")
+endif()
+endif()
+endif()
if (DEFINED LIBNAMESUFFIX)
set(LIBPREFIX "libopenblas_${LIBNAMESUFFIX}")
else ()
