tbb: add test
Closes Homebrew/homebrew#35491. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
a08492c8b1
commit
201c16c1de
1 changed files with 15 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue