Skip to content

Commit

Permalink
tbb 4.2.4
Browse files Browse the repository at this point in the history
 - Fix LLVM failure
  • Loading branch information
jacknagel committed May 22, 2014
1 parent 4926e3b commit 8e18f43
Showing 1 changed file with 28 additions and 19 deletions.
47 changes: 28 additions & 19 deletions Formula/tbb.rb
@@ -1,30 +1,39 @@
require 'formula'
require "formula"

class Tbb < Formula
homepage 'http://www.threadingbuildingblocks.org/'
url 'https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb42_20140122oss_src.tgz'
sha1 'd897a6ced4f425c6608422a2e19218898e727260'
version '4.2.3'
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

fails_with :llvm do
cause 'llvm is not supported on macos. Add build/macos.llvm.inc file with compiler-specific settings.'
end

def install
# Intel sets varying O levels on each compile command.
ENV.no_optimization
ENV.cxx11 if build.cxx11?
# Override build prefix so we can copy the dylibs out of the same place
# no matter what system we're on, and use our compilers.
compiler = ENV.compiler.to_s.start_with?('gcc') ? 'gcc' : ENV.compiler
args = ['tbb_build_prefix=BUILDPREFIX',
"compiler=#{compiler}"]
args << (MacOS.prefer_64_bit? ? "arch=intel64" : "arch=ia32")
args << "cpp0x=1" << "stdlib=libc++" if build.cxx11?

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'
lib.install Dir["build/BUILDPREFIX_release/*.dylib"]
include.install "include/tbb"
end
end

0 comments on commit 8e18f43

Please sign in to comment.