From bb3675999f26af14c25e652f9c614432156f3526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Wed, 11 Jul 2012 10:11:01 +0200 Subject: [PATCH] Ninja: enable response file support on Mac (length 262144) --- Source/cmNinjaNormalTargetGenerator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index f6f235c64..3e5ac4175 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -488,8 +488,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() GetRuleCmdLength(this->LanguageLinkerRule()); #ifdef _WIN32 int commandLineLengthLimit = 8000 - linkRuleLength; -#elif __linux - // for instance ARG_MAX is 2096152 on Ubuntu +#elif defined(__linux) || defined(__APPLE__) + // for instance ARG_MAX is 2096152 on Ubuntu or 262144 on Mac int commandLineLengthLimit = sysconf(_SC_ARG_MAX) - linkRuleLength - 1000; #else int commandLineLengthLimit = -1;