# Contributor: Duncan Bellamy # Maintainer: Duncan Bellamy pkgname=benchmark pkgver=1.8.2 pkgrel=0 pkgdesc="microbenchmark support library" url="https://github.com/google/benchmark" arch="all" license="Apache-2.0" makedepends="cmake doxygen gtest-dev samurai" subpackages="$pkgname-dev $pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/google/benchmark/archive/v$pkgver.tar.gz" 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=MinSizeRel \ -DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF \ -DBENCHMARK_ENABLE_DOXYGEN=ON \ -DBENCHMARK_ENABLE_LTO=ON \ -DBENCHMARK_ENABLE_WERROR=OFF \ -DBENCHMARK_USE_BUNDLED_GTEST=OFF \ $CMAKE_CROSSOPTS . cmake --build build } check() { cd build CTEST_OUTPUT_ON_FAILURE=TRUE ctest } package() { DESTDIR="$pkgdir" cmake --install build } sha512sums=" 532f2cee66cf527ef4452a060cfdedba6417e5d8f72225d6bf50adf6422d9a769b0f54f48982b438fa9ced975ac47bcc5e62c3c23ce871b5cfdbcf9cc0d2b829 benchmark-1.8.2.tar.gz "