From 8ff7c13227691fb1ca7543951ea7c1678353646f Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 24 Oct 2002 15:39:25 -0400 Subject: [PATCH] BUG: fix stack limit size on mac OSX --- Source/cmake.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 6c9e56871..340ee32dd 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -36,8 +36,26 @@ #include +#ifdef __APPLE__ +#include +#include +#include +#endif + cmake::cmake() { +#ifdef __APPLE__ + struct rlimit rlp; + if(!getrlimit(RLIMIT_STACK, &rlp)) + { + if(rlp.rlim_cur != rlp.rlim_max) + { + rlp.rlim_cur = rlp.rlim_max; + setrlimit(RLIMIT_STACK, &rlp); + } + } +#endif + m_Local = false; m_Verbose = false; m_InTryCompile = false;