blob: 11469a2c60fb72d008d5c0c39c2ba308a100ff81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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
|