blob: 88dc9395ffed619383b07ada65b16d26830dc03d (
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
31
32
33
34
|
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit cmake-utils
MY_PN="unittest-cpp"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="A lightweight unit testing framework for C++"
HOMEPAGE="https://unittest-cpp.github.io/"
SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
S="${WORKDIR}/${MY_P}"
src_prepare() {
sed -i '/run unit tests as post build step/,/Running unit tests/d' \
CMakeLists.txt || die
use test || sed -i \
'/build the test runner/,/target_link_libraries(TestUnitTest++ UnitTest++/d' \
CMakeLists.txt || die
cmake-utils_src_prepare
}
src_test() {
"${BUILD_DIR}/TestUnitTest++" || die "Tests failed"
}
|