summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2024-10-08 04:49:38 -0400
committerFlorian Schmaus <flow@gentoo.org>2024-10-14 09:14:00 +0200
commita9924d310c7adbc1948b1086e3d4b67b8cdecd19 (patch)
tree506a8b7e0579174787818adcf29949abfadf6383 /dev-cpp/gtest/files
parentdev-cpp/gtest: use CMAKE_SKIP_TESTS to filter tests (diff)
downloadgentoo-a9924d310c7adbc1948b1086e3d4b67b8cdecd19.tar.gz
gentoo-a9924d310c7adbc1948b1086e3d4b67b8cdecd19.tar.bz2
gentoo-a9924d310c7adbc1948b1086e3d4b67b8cdecd19.zip
dev-cpp/gtest: add support for abseil and re2
Use abseil for functionality such as using AbslStringify for extensible print formatting, and use re2 for regex engine and syntax. Signed-off-by: Peter Levine <plevine457@gmail.com> Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-cpp/gtest/files')
-rw-r--r--dev-cpp/gtest/files/gtest-find-re2-with-pkgconfig.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-cpp/gtest/files/gtest-find-re2-with-pkgconfig.patch b/dev-cpp/gtest/files/gtest-find-re2-with-pkgconfig.patch
new file mode 100644
index 000000000000..3a78ae15cac3
--- /dev/null
+++ b/dev-cpp/gtest/files/gtest-find-re2-with-pkgconfig.patch
@@ -0,0 +1,32 @@
+dev-libs/re2 is built with a Makefile which doesn't install any cmake modules.
+For now, use pkgconfig.
+
+Bug: https://bugs.gentoo.org/940734
+Signed-off-by: Peter Levine <plevine457@gmail.com>
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -25,7 +25,9 @@
+ find_package(absl REQUIRED)
+ endif()
+ if(NOT TARGET re2::re2)
+- find_package(re2 REQUIRED)
++ find_package(PkgConfig REQUIRED)
++ pkg_check_modules(re2 REQUIRED IMPORTED_TARGET re2)
++ add_library(re2::re2 ALIAS PkgConfig::re2)
+ endif()
+ endif()
+
+--- a/googletest/cmake/Config.cmake.in
++++ b/googletest/cmake/Config.cmake.in
+@@ -6,7 +6,9 @@
+ endif()
+ if (@GTEST_HAS_ABSL@)
+ find_dependency(absl)
+- find_dependency(re2)
++ find_package(PkgConfig)
++ pkg_check_modules(re2 IMPORTED_TARGET re2)
++ add_library(re2::re2 ALIAS PkgConfig::re2)
+ endif()
+
+ include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")