summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/crc32c-unbundle-googletest.patch
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2022-09-26 21:30:49 +0800
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-09-28 20:22:38 +0200
commitdc07a4ce6c34c2b61d0713a4a6ed89bc128783b4 (patch)
tree89a26245f1c13c53353a8f56e0f84d1cfea00de7 /gnu/packages/patches/crc32c-unbundle-googletest.patch
parent7bcfdebc55f8b50d490201e63461d6533d60c19d (diff)
gnu: Add crc32c.
* gnu/packages/cpp.scm (crc32c): New variable. * gnu/packages/patches/crc32c-unbundle-googletest.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages/patches/crc32c-unbundle-googletest.patch')
-rw-r--r--gnu/packages/patches/crc32c-unbundle-googletest.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/patches/crc32c-unbundle-googletest.patch b/gnu/packages/patches/crc32c-unbundle-googletest.patch
new file mode 100644
index 0000000000..da513c5d4e
--- /dev/null
+++ b/gnu/packages/patches/crc32c-unbundle-googletest.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8490728..c7f0952 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -315,15 +315,7 @@ if(CRC32C_BUILD_TESTS)
+ set(install_gmock OFF)
+
+ # This project is tested using GoogleTest.
+- add_subdirectory("third_party/googletest")
+-
+- # GoogleTest triggers a missing field initializers warning.
+- if(CRC32C_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(CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS)
++ find_package(GTest REQUIRED)
+
+ add_executable(crc32c_tests "")
+ target_sources(crc32c_tests