From 5d4fb44aca482e593f9d6558699ef7fed119868e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Fri, 30 Oct 2020 21:28:40 +0100 Subject: [faiss] Add new port (#13825) --- ports/faiss/portfile.cmake | 34 ++++++++++++++++++++++++++++++++++ ports/faiss/vcpkg.json | 20 ++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 ports/faiss/portfile.cmake create mode 100644 ports/faiss/vcpkg.json diff --git a/ports/faiss/portfile.cmake b/ports/faiss/portfile.cmake new file mode 100644 index 000000000..05a4273bf --- /dev/null +++ b/ports/faiss/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_ARCH "x86" ON_TARGET "uwp" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebookresearch/faiss + REF 0fb6c00cfa9487416b5cdf514f5f796476eecb06 # v1.6.4 + SHA512 c7019615103fd29124c1f4458a47faebc5fe35545eea185c41cf643f2eabe82d134dc558c85f67faea7680c292abd7477ceefde157a7c3969eda78b77a23462b + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + gpu FAISS_ENABLE_GPU +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DFAISS_ENABLE_PYTHON=OFF # Requires SWIG +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/faiss/vcpkg.json b/ports/faiss/vcpkg.json new file mode 100644 index 000000000..039513d3a --- /dev/null +++ b/ports/faiss/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "faiss", + "version-string": "1.6.4", + "description": "Faiss is a library for efficient similarity search and clustering of dense vectors.", + "homepage": "https://github.com/facebookresearch/faiss", + "license": "MIT", + "supports": "!uwp & !osx & !x86", + "dependencies": [ + "lapack", + "openblas" + ], + "features": { + "gpu": { + "description": "Whether to enable GPU support", + "dependencies": [ + "cuda" + ] + } + } +} -- cgit v1.2.3