blob: 5dd266c8dbfd8e2665a669b5d1cc01934c91a81d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
require "formula"
class Tbb < Formula
homepage "http://www.threadingbuildingblocks.org/"
url "https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb42_20140416oss_src.tgz"
sha1 "1285471b4dce67cf3edf20a071db37f4f205bcf1"
version "4.2.4"
option :cxx11
def install
# Intel sets varying O levels on each compile command.
ENV.no_optimization
args = %W[tbb_build_prefix=BUILDPREFIX]
case ENV.compiler
when :clang
args << "compiler=clang"
else
args << "compiler=gcc"
end
if MacOS.prefer_64_bit?
args << "arch=intel64"
else
args << "arch=ia32"
end
if build.cxx11?
ENV.cxx11
args << "cpp0x=1" << "stdlib=libc++"
end
system "make", *args
lib.install Dir["build/BUILDPREFIX_release/*.dylib"]
include.install "include/tbb"
end
end
|