gentoo/dev-cpp/lucene++/files/lucene++-3.0.9-system-gtest.patch
Holger Hoffstätte bbc1170fe2
dev-cpp/lucene++: fixes for boost-1.89, cmake4, gtest & gcc-15
Closes: https://bugs.gentoo.org/957220
Closes: https://bugs.gentoo.org/963333
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Part-of: https://github.com/gentoo/gentoo/pull/43958
Closes: https://github.com/gentoo/gentoo/pull/43958
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2025-09-30 16:31:50 +02:00

22 lines
522 B
Diff

From: https://github.com/luceneplusplus/LucenePlusPlus/pull/218
From: Gianfranco Costamagna <locutusofborg@debian.org>
Date: Mon, 8 Sep 2025 15:05:34 +0200
Subject: [PATCH] Find and use system googletest if available
--- a/src/test/CMakeLists.txt
+++ b/src/test/CMakeLists.txt
@@ -8,8 +8,10 @@ if(MSVC)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
endif()
-add_subdirectory(gtest)
-
+find_package(GTest)
+if(NOT GTEST_FOUND)
+ add_subdirectory(gtest)
+endif()
####################################
# src