summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-10-24 19:39:25 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-10-24 19:39:25 (GMT)
commit8ff7c13227691fb1ca7543951ea7c1678353646f (patch)
treeabc69aad8e8374fb7cf64f4861d11fd9e9c7ecf7 /Source/cmake.cxx
parent5b9b793dde1de9d0e4686abd06f68c1a630ed0aa (diff)
downloadCMake-8ff7c13227691fb1ca7543951ea7c1678353646f.zip
CMake-8ff7c13227691fb1ca7543951ea7c1678353646f.tar.gz
CMake-8ff7c13227691fb1ca7543951ea7c1678353646f.tar.bz2
BUG: fix stack limit size on mac OSX
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 6c9e568..340ee32 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -36,8 +36,26 @@
#include <stdio.h>
+#ifdef __APPLE__
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#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;