* [ITA] snappy
@ 2024-02-22 10:24 Takashi Yano
0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2024-02-22 10:24 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 79 bytes --]
I'd like to adopt snappy package.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
[-- Attachment #2: snappy.cygport --]
[-- Type: text/plain, Size: 963 bytes --]
inherit cmake
NAME="snappy"
VERSION=1.1.10
RELEASE=1
LICENSE="BSD-3-Clauses"
CATEGORY="Libs"
SUMMARY="Fast compression library"
DESCRIPTION="Snappy is a compression/decompression library. It does not aim for
maximum compression, or compatibility with any other compression library,
instead, it aims for very high speeds and reasonable compression."
HOMEPAGE="https://github.com/google/snappy/"
SRC_URI="https://github.com/google/snappy/archive/${VERSION}/snappy-${VERSION}.tar.gz"
PATCH_URI="
https://src.fedoraproject.org/rpms/snappy/raw/f40/f/snappy-thirdparty.patch
"
PKG_NAMES="libsnappy1 libsnappy-devel"
libsnappy1_CONTENTS="
usr/bin/cygsnappy-1.dll
usr/share/doc/${NAME}
"
libsnappy_devel_CONTENTS="
usr/include/snappy*.h
usr/lib/cmake/Snappy/
usr/lib/libsnappy.dll.a
"
CYGCMAKE_ARGS="
-DBUILD_SHARED_LIBS=ON
-DSNAPPY_BUILD_TESTS=OFF
-DSNAPPY_BUILD_BENCHMARKS=OFF
"
BUILD_REQUIRES="liblzo2-devel liblz4-devel"
[-- Attachment #3: snappy-thirdparty.patch --]
[-- Type: text/plain, Size: 1720 bytes --]
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -306,29 +306,12 @@
if(SNAPPY_BUILD_TESTS)
enable_testing()
- # Prevent overriding the parent project's compiler/linker settings on Windows.
- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
- set(install_gtest OFF)
- set(install_gmock OFF)
- 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)
-
add_executable(snappy_unittest "")
target_sources(snappy_unittest
PRIVATE
"snappy_unittest.cc"
)
- target_link_libraries(snappy_unittest snappy_test_support gmock_main gtest)
+ target_link_libraries(snappy_unittest snappy_test_support gtest_main gtest)
add_test(
NAME snappy_unittest
@@ -349,12 +332,11 @@
PRIVATE
"snappy_benchmark.cc"
)
- target_link_libraries(snappy_benchmark snappy_test_support benchmark_main)
+ target_link_libraries(snappy_benchmark snappy_test_support benchmark_main benchmark)
# This project uses Google benchmark for benchmarking.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "" FORCE)
- add_subdirectory("third_party/benchmark")
endif(SNAPPY_BUILD_BENCHMARKS)
if(SNAPPY_FUZZING_BUILD)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-22 10:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 10:24 [ITA] snappy Takashi Yano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).