diff options
| author | bucurb <bobuc@microsoft.com> | 2021-07-16 20:03:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-16 12:03:54 -0700 |
| commit | 0f059596124b7afce437e5dad4588fb3ff06719e (patch) | |
| tree | 4249f4e415513eecc06dda3c9e966d6ee4a275da /ports/faiss | |
| parent | 0bf44b144bb767f48685ac84e5bfd76f05db958f (diff) | |
| download | vcpkg-0f059596124b7afce437e5dad4588fb3ff06719e.tar.gz vcpkg-0f059596124b7afce437e5dad4588fb3ff06719e.zip | |
[Faiss] Fix dependencies (#18780)
* fixed targets
* bumped port version
* updated sha
* lapack-reference should always write into lapack
* lapack-reference sha
* Fixed clapack target
* versions
* sha
* ensure cmake finds the cuda compiler
* sha
Diffstat (limited to 'ports/faiss')
| -rw-r--r-- | ports/faiss/fix-dependencies.patch | 34 | ||||
| -rw-r--r-- | ports/faiss/portfile.cmake | 11 | ||||
| -rw-r--r-- | ports/faiss/vcpkg.json | 3 |
3 files changed, 46 insertions, 2 deletions
diff --git a/ports/faiss/fix-dependencies.patch b/ports/faiss/fix-dependencies.patch new file mode 100644 index 000000000..caddb6b57 --- /dev/null +++ b/ports/faiss/fix-dependencies.patch @@ -0,0 +1,34 @@ +diff --git a/cmake/faiss-config.cmake.in b/cmake/faiss-config.cmake.in
+index 43ea9d4c..437a7f81 100644
+--- a/cmake/faiss-config.cmake.in
++++ b/cmake/faiss-config.cmake.in
+@@ -4,4 +4,7 @@
+ # This source code is licensed under the BSD-style license found in the
+ # LICENSE file in the root directory of this source tree.
+
++find_dependency(OpenMP REQUIRED)
++find_dependency(BLAS REQUIRED)
++find_dependency(LAPACK REQUIRED)
+ include("${CMAKE_CURRENT_LIST_DIR}/faiss-targets.cmake")
+diff --git a/faiss/CMakeLists.txt b/faiss/CMakeLists.txt
+index 51680fd1..691f52c2 100644
+--- a/faiss/CMakeLists.txt
++++ b/faiss/CMakeLists.txt
+@@ -148,14 +148,14 @@ find_package(OpenMP REQUIRED)
+ target_link_libraries(faiss PRIVATE OpenMP::OpenMP_CXX)
+
+ find_package(MKL)
+-if(MKL_FOUND)
++if(0)
+ target_link_libraries(faiss PRIVATE ${MKL_LIBRARIES})
+ else()
+ find_package(BLAS REQUIRED)
+- target_link_libraries(faiss PRIVATE ${BLAS_LIBRARIES})
++ target_link_libraries(faiss PRIVATE BLAS::BLAS)
+
+ find_package(LAPACK REQUIRED)
+- target_link_libraries(faiss PRIVATE ${LAPACK_LIBRARIES})
++ target_link_libraries(faiss PRIVATE LAPACK::LAPACK)
+ endif()
+
+ install(TARGETS faiss
diff --git a/ports/faiss/portfile.cmake b/ports/faiss/portfile.cmake index 05a4273bf..51529558f 100644 --- a/ports/faiss/portfile.cmake +++ b/ports/faiss/portfile.cmake @@ -6,12 +6,21 @@ vcpkg_from_github( REF 0fb6c00cfa9487416b5cdf514f5f796476eecb06 # v1.6.4
SHA512 c7019615103fd29124c1f4458a47faebc5fe35545eea185c41cf643f2eabe82d134dc558c85f67faea7680c292abd7477ceefde157a7c3969eda78b77a23462b
HEAD_REF master
+ PATCHES
+ fix-dependencies.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
- gpu FAISS_ENABLE_GPU
+ FEATURES
+ gpu FAISS_ENABLE_GPU
)
+if ("${FAISS_ENABLE_GPU}")
+ if (NOT VCPKG_CMAKE_SYSTEM_NAME AND NOT ENV{CUDACXX})
+ set(ENV{CUDACXX} "$ENV{CUDA_PATH}/bin/nvcc.exe")
+ endif()
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
diff --git a/ports/faiss/vcpkg.json b/ports/faiss/vcpkg.json index 039513d3a..4b9c63691 100644 --- a/ports/faiss/vcpkg.json +++ b/ports/faiss/vcpkg.json @@ -1,6 +1,7 @@ { "name": "faiss", - "version-string": "1.6.4", + "version-semver": "1.6.4", + "port-version": 1, "description": "Faiss is a library for efficient similarity search and clustering of dense vectors.", "homepage": "https://github.com/facebookresearch/faiss", "license": "MIT", |
