summaryrefslogtreecommitdiff
path: root/repo/catch2/catch2.xibuild
blob: f493465853e83d0fa26bb267dcaf90acd567ff10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

NAME="catch2"
DESC="A modern, C++-native, header-only, test framework for unit-tests"

MAKEDEPS="cmake python"

PKG_VER=2.13.8
SOURCE="https://github.com/catchorg/Catch2/archive/v$PKG_VER/catch2-v$PKG_VER.tar.gz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=TRUE
	cmake --build build
}

check() {
	cd build
	# ApprovalTests is broken https://github.com/catchorg/Catch2/issues/1780
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "ApprovalTests"
}

package() {
    cd $BUILD_ROOT
	DESTDIR="$PKG_DEST" cmake --install build
}