diff options
| author | Xu Cheng | 2015-01-03 15:46:12 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-03 18:39:14 +0000 |
| commit | cf6d8e60776c01b0d2ed43e1c177bc5e591eb5f4 (patch) | |
| tree | 49de964a3b54aa4ff1e71c9d2e4048135703b693 /Library/Formula | |
| parent | 6e06a8e5669c7599d43a75eb3fbd700068eb6a61 (diff) | |
| download | homebrew-cf6d8e60776c01b0d2ed43e1c177bc5e591eb5f4.tar.bz2 | |
tbb: add test
Closes #35491.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/tbb.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Library/Formula/tbb.rb b/Library/Formula/tbb.rb index dd32392b6..87b7d63c2 100644 --- a/Library/Formula/tbb.rb +++ b/Library/Formula/tbb.rb @@ -1,5 +1,3 @@ -require "formula" - class Tbb < Formula homepage "http://www.threadingbuildingblocks.org/" url "https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb43_20141023oss_src.tgz" @@ -34,4 +32,19 @@ class Tbb < Formula lib.install Dir["build/BUILDPREFIX_release/*.dylib"] include.install "include/tbb" end + + test do + (testpath/"test.cpp").write <<-EOS.undent + #include <tbb/task_scheduler_init.h> + #include <iostream> + + int main() + { + std::cout << tbb::task_scheduler_init::default_num_threads(); + return 0; + } + EOS + system ENV.cxx, "test.cpp", "-ltbb", "-o", "test" + system "./test" + end end |
