Commit 20896e65 authored by Nick Black's avatar Nick Black Committed by Rasmus Thomsen

testing/doctest: new aport

parent c9ecca0a
# Contributor: Nick Black <dankamongmen@gmail.com>
# Maintainer: Nick Black <dankamongmen@gmail.com>
pkgname=doctest
pkgver=2.4.0
pkgrel=0
pkgdesc="Fast header-only C++ unit testing"
url="https://github.com/onqtam/doctest"
arch="noarch"
license="MIT"
subpackages="$pkgname-dev"
makedepends="cmake"
source="$pkgname-$pkgver.tar.gz::https://github.com/onqtam/doctest/archive/$pkgver.tar.gz"
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B "$pkgname-$pkgver" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=None \
$CMAKE_CROSSOPTS
cmake --build "$pkgname-$pkgver"
}
check() {
CTEST_OUTPUT_ON_FAILURE=TRUE ctest --build-run-dir "$pkgname-$pkgver"
}
package() {
DESTDIR="$pkgdir" cmake --build "$pkgname-$pkgver" --target install
}
sha512sums="96e8a7ceafbe99fbc09e3b5617c799cf0ff28102b24392ec14b55cd525e9dd156a996e578168009a494a7deb64f640d19b79137e5c067d103dba23d7c3375400 doctest-2.4.0.tar.gz"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment