From 14424feab2d9eb9ee7407e8a6b09abae13c83c59 Mon Sep 17 00:00:00 2001 From: Max Howell <max@methylblue.com> Date: Wed, 3 Jun 2009 19:17:41 +0100 Subject: [PATCH] Determine number of cores using RubyCocoa #win --- Cellar/homebrew/brewkit.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb index b19cfcf66b..defdb02f05 100644 --- a/Cellar/homebrew/brewkit.rb +++ b/Cellar/homebrew/brewkit.rb @@ -1,6 +1,7 @@ # Copyright 2009 Max Howell <max@methylblue.com> # Licensed as per the GPL version 3 require 'pathname' +require 'osx/cocoa' # to get number of cores HOMEBREW_VERSION='0.1' @@ -15,7 +16,7 @@ ENV['CFLAGS']=ENV['CXXFLAGS']='-O3 -w -pipe -fomit-frame-pointer -march=prescott # if I'm wrong ENV['CC']='gcc-4.2' ENV['CXX']='g++-4.2' -ENV['MAKEFLAGS']='-j2' +ENV['MAKEFLAGS']="-j#{OSX::NSProcessInfo.processInfo.processorCount}" unless $root.to_s == '/usr/local' ENV['CPPFLAGS']='-I'+$root+'include' -- GitLab