aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/tbb.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/tbb.rb')
-rw-r--r--Library/Formula/tbb.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Formula/tbb.rb b/Library/Formula/tbb.rb
index 040407f46..26a2df3aa 100644
--- a/Library/Formula/tbb.rb
+++ b/Library/Formula/tbb.rb
@@ -6,6 +6,8 @@ class Tbb < Formula
sha1 'f354bd9b67295f65c43531b751e34f483ed8a024'
version '4.2'
+ option :cxx11
+
fails_with :llvm do
cause 'llvm is not supported on macos. Add build/macos.llvm.inc file with compiler-specific settings.'
end
@@ -18,11 +20,13 @@ class Tbb < Formula
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.
args = ['tbb_build_prefix=BUILDPREFIX',
"compiler=#{ENV.compiler}"]
args << (MacOS.prefer_64_bit? ? "arch=intel64" : "arch=ia32")
+ args << "cpp0x=1" << "stdlib=libc++" if build.cxx11?
system "make", *args
lib.install Dir['build/BUILDPREFIX_release/*.dylib']
include.install 'include/tbb'