backports/*: sync with 3.19 testing #278

Merged
ayakael merged 40 commits from 3.19-initial into edge 2023-11-24 22:35:29 +00:00
2 changed files with 0 additions and 113 deletions
Showing only changes of commit ba0caca883 - Show all commits

View file

@ -1,68 +0,0 @@
Author: Holger Jaekel <holger.jaekel@gmx.de>
Summary: ignore googletest, glog, and benchmark from the third-party folder
----
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,7 @@
# C++ standard can be overridden when this is used as a sub-project.
if(NOT CMAKE_CXX_STANDARD)
# This project requires C++11.
- set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif(NOT CMAKE_CXX_STANDARD)
@@ -187,26 +187,8 @@
# CPU cycles on the CI.
set(BUILD_TESTING_SAVED "${BUILD_TESTING}")
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
- add_subdirectory("third_party/glog" EXCLUDE_FROM_ALL)
set(BUILD_TESTING "${BUILD_TESTING_SAVED}" CACHE BOOL "" FORCE)
- # glog triggers deprecation warnings on OSX.
- # https://github.com/google/glog/issues/185
- if(CRC32C_HAVE_NO_DEPRECATED)
- set_property(TARGET glog APPEND PROPERTY COMPILE_OPTIONS -Wno-deprecated)
- endif(CRC32C_HAVE_NO_DEPRECATED)
-
- # glog triggers sign comparison warnings on gcc.
- if(CRC32C_HAVE_NO_SIGN_COMPARE)
- set_property(TARGET glog APPEND PROPERTY COMPILE_OPTIONS -Wno-sign-compare)
- endif(CRC32C_HAVE_NO_SIGN_COMPARE)
-
- # glog triggers unused parameter warnings on clang.
- if(CRC32C_HAVE_NO_UNUSED_PARAMETER)
- set_property(TARGET glog
- APPEND PROPERTY COMPILE_OPTIONS -Wno-unused-parameter)
- endif(CRC32C_HAVE_NO_UNUSED_PARAMETER)
-
set(CRC32C_TESTS_BUILT_WITH_GLOG 1)
endif(CRC32C_USE_GLOG)
@@ -314,17 +296,6 @@
set(install_gtest OFF)
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)
-
add_executable(crc32c_tests "")
target_sources(crc32c_tests
PRIVATE
@@ -385,7 +356,6 @@
# 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")
target_link_libraries(crc32c_bench benchmark)
if(CRC32C_USE_GLOG)

View file

@ -1,45 +0,0 @@
# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
pkgname=crc32c
pkgver=1.1.2
pkgrel=0
pkgdesc="CRC32C implementation with support for CPU-specific acceleration instructions"
url="https://github.com/google/crc32c"
arch="all"
license="BSD-3-Clause"
makedepends="cmake samurai"
checkdepends="benchmark-dev glog-dev gtest-dev"
subpackages="$pkgname-dev"
source="crc32c-$pkgver.tar.gz::https://github.com/google/crc32c/archive/$pkgver.tar.gz
10-third-party.patch"
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=None \
-DCRC32C_BUILD_TESTS="$(want_check && echo ON || echo OFF)" \
-DCRC32C_BUILD_BENCHMARKS="$(want_check && echo ON || echo OFF)" \
-DCRC32C_USE_GLOG="$(want_check && echo ON || echo OFF)" \
-DCRC32C_INSTALL=ON \
$CMAKE_CROSSOPTS .
cmake --build build
}
check() {
cd build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
./crc32c_bench
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
6325c52b5a6850b9f90086e0c0c86798c008af36e7cfd3a0216184a2d37b3bf7323481ddc6bfe4cbd5b31288b3ee6c69772d03085a13094cf95d00a9756a7196 crc32c-1.1.2.tar.gz
1f83e03d53271ee65a21e04c57392313003227a71a8c6de1fcf6c5d9041eaeb3cd08a9d4b86a610b80c06589cd06d36ae5e224d109256300b05fa65d638beddb 10-third-party.patch
"