mirror of
https://https.git.savannah.gnu.org/git/guix.git/
synced 2025-07-12 01:50:46 +02:00
* gnu/packages/graph.scm (faiss): Update to 1.10.0. [source]: Adapt snippet. Add patch. [arguments]: Delete likely uneeded {phases}. Adapt {configure-flags}. [native-inputs]: Add openmpi. (python-faiss): Update to 1.10.0. [build-system]: Switch to cmake-build-system. [arguments]: Rewrite all arguments. [inputs]: Improve-style. Switch python for python-wrapper. [native-inputs]: Add python-scipy. [propagated-inputs]: Remove python-matplotlib. * gnu/packages/patches/faiss-tests-CMakeLists-find-googletest.patch: Add patch. * gnu/local.mk: Likewise. Change-Id: Ia1d29af1b7ea1d8f0fe27fdbb8c6a355889bfd30 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
53 lines
1.7 KiB
Diff
53 lines
1.7 KiB
Diff
From 9f845321de3bdd2b840c42b977c1c092ac553cc2 Mon Sep 17 00:00:00 2001
|
|
From: Nicolas Graves <ngraves@ngraves.fr>
|
|
Date: Fri, 21 Feb 2025 12:05:59 +0100
|
|
Subject: [PATCH] tests/CMakeLists.txt: Find googletest package from inputs
|
|
|
|
---
|
|
tests/CMakeLists.txt | 29 +----------------------------
|
|
1 file changed, 1 insertion(+), 28 deletions(-)
|
|
|
|
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
|
index dfab76e0..16a51b0b 100644
|
|
--- a/tests/CMakeLists.txt
|
|
+++ b/tests/CMakeLists.txt
|
|
@@ -48,35 +48,8 @@ if (FAISS_ENABLE_PYTHON)
|
|
target_link_libraries(faiss_test PUBLIC faiss_example_external_module)
|
|
endif()
|
|
|
|
-include(FetchContent)
|
|
-FetchContent_Declare(
|
|
- googletest
|
|
- GIT_REPOSITORY https://github.com/google/googletest.git
|
|
- GIT_TAG 58d77fa8070e8cec2dc1ed015d66b454c8d78850 # release-1.12.1
|
|
- OVERRIDE_FIND_PACKAGE)
|
|
-set(BUILD_GMOCK CACHE BOOL OFF)
|
|
-set(INSTALL_GTEST CACHE BOOL OFF)
|
|
-FetchContent_MakeAvailable(googletest)
|
|
-
|
|
-if(NOT EXISTS ${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}/gtest-config.cmake
|
|
- AND NOT EXISTS ${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}/GTestConfig.cmake)
|
|
- file(
|
|
- WRITE ${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}/gtest-config.cmake
|
|
- [=[
|
|
-include(CMakeFindDependencyMacro)
|
|
-find_dependency(googletest)
|
|
-if(NOT TARGET GTest::GTest)
|
|
- add_library(GTest::GTest INTERFACE IMPORTED)
|
|
- target_link_libraries(GTest::GTest INTERFACE GTest::gtest)
|
|
-endif()
|
|
-if(NOT TARGET GTest::Main)
|
|
- add_library(GTest::Main INTERFACE IMPORTED)
|
|
- target_link_libraries(GTest::Main INTERFACE GTest::gtest_main)
|
|
-endif()
|
|
-]=])
|
|
-endif()
|
|
-
|
|
find_package(OpenMP REQUIRED)
|
|
+find_package(GTest REQUIRED)
|
|
find_package(GTest CONFIG REQUIRED)
|
|
|
|
target_link_libraries(faiss_test PRIVATE
|
|
--
|
|
2.48.1
|
|
|