faiss 1.6.1 (new formula)

Added missing dependency

Closes #49235.

Signed-off-by: Rui Chen <chenrui333@gmail.com>
master
Andrew Kane 2020-01-18 14:34:27 -08:00 committed by Rui Chen
parent 4984154340
commit 01f63e2eef
1 changed files with 29 additions and 0 deletions

29
Formula/faiss.rb Normal file
View File

@ -0,0 +1,29 @@
class Faiss < Formula
desc "Efficient similarity search and clustering of dense vectors"
homepage "https://github.com/facebookresearch/faiss"
url "https://github.com/facebookresearch/faiss/archive/v1.6.1.tar.gz"
sha256 "827437c9a684fcb88ee21a8fd8f0ecd94f36e2db213f74357d0465c5a7e72ac6"
depends_on "libomp"
def install
system "./configure", "--without-cuda",
"--prefix=#{prefix}"
system "make"
system "make", "install"
end
test do
(testpath/"test.cpp").write <<~EOS
#include <faiss/IndexFlat.h>
int main()
{
faiss::IndexFlatL2 index(64);
return 0;
}
EOS
system ENV.cxx, "-std=c++11", "-L#{lib}", "-lfaiss", "test.cpp", "-o", "test"
system "./test"
end
end