You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-arch/snappy/files/snappy-1.1.9_external_gtest...

35 lines
1.1 KiB

From 9c1283f6022647a6ea39c1388321d6029fcdf80c Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Wed, 5 May 2021 21:19:22 +0300
Subject: [PATCH] Use external GTest framework
---
CMakeLists.txt | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 672561e..fc830fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -291,15 +291,8 @@ if(SNAPPY_BUILD_TESTS)
set(build_gmock ON)
# This project is tested using GoogleTest.
- add_subdirectory("third_party/googletest")
-
- # GoogleTest triggers a missing field initializers warning.
- if(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
- set_property(TARGET gtest
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
- set_property(TARGET gmock
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
- endif(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+ find_package(GTest REQUIRED)
+ include(GoogleTest)
add_executable(snappy_unittest "")
target_sources(snappy_unittest
--
2.26.3