gentoo-ebuilds/sci-libs/flann/files/flann-1.9.2-system-gtest.patch
Paul Zander 4db46c9502
sci-libs/flann: add 1.9.2_p20221027, drop 1.9.2
uses latest upstream commit

update cmake code, handle warnings
use enable_language for cuda and fix warnings in code
use find_package(Python) instead of PythonInterp
fix erroneous dependency for doc, unmask the flag

Closes: https://bugs.gentoo.org/947608
Closes: https://bugs.gentoo.org/947602
Closes: https://bugs.gentoo.org/946465
Closes: https://bugs.gentoo.org/829080
Bug: https://bugs.gentoo.org/830013
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-06 21:32:03 +00:00

36 lines
1,000 B
Diff

From 4001b11f20ccfc291a355c52a090fa16e2f5a5f1 Mon Sep 17 00:00:00 2001
From: Paul Zander <negril.nx+gentoo@gmail.com>
Date: Mon, 6 Jan 2025 16:13:09 +0100
Subject: [PATCH] system gtest
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
diff --git a/cmake/flann_utils.cmake b/cmake/flann_utils.cmake
index e02a6ff..544f87a 100644
--- a/cmake/flann_utils.cmake
+++ b/cmake/flann_utils.cmake
@@ -41,6 +41,13 @@ macro(find_hdf5)
endmacro(find_hdf5)
+if(BUILD_TESTS)
+enable_testing()
+find_package(GTest)
+if(GTest_FOUND)
+ set(googletest_LIBRARIES GTest::gtest)
+ add_library(googletest ALIAS GTest::gtest)
+else()
# Enable ExternalProject CMake module
include(ExternalProject)
@@ -69,6 +76,8 @@ set(googletest_INCLUDE_DIRS ${source_dir}/googletest/include)
ExternalProject_Get_Property(googletest binary_dir)
set(googletest_LIBRARIES ${binary_dir}/lib/libgtest.a)
include_directories(${googletest_INCLUDE_DIRS})
+endif()
+endif()
macro(flann_add_gtest exe src)
--
2.47.1