git: c3089c26d87c - main - devel/pika: Add test target

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 13 Jul 2022 20:31:57 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c3089c26d87ccb73884a911f2175d91fba0b3c27

commit c3089c26d87ccb73884a911f2175d91fba0b3c27
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-07-13 20:31:24 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-07-13 20:31:55 +0000

    devel/pika: Add test target
---
 devel/pika/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/devel/pika/Makefile b/devel/pika/Makefile
index 81cb72e81c47..c28c2010fc0b 100644
--- a/devel/pika/Makefile
+++ b/devel/pika/Makefile
@@ -19,11 +19,15 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	pika-org
 
 CMAKE_ON=	PIKA_WITH_MALLOC
-CMAKE_TESTING_ON=	PIKA_WITH_TESTS # unclear how to run tests
+CMAKE_TESTING_ON=	PIKA_WITH_TESTS PIKA_WITH_TESTS_UNIT # unclear how to run tests
+CMAKE_TESTING_TARGET=	tests test
 
 BINARY_ALIAS=	git=false
 
 post-install:
 	@${RM} -r ${STAGEDIR}${DATADIR} # remove copy of license
 
+pre-test: # unlike most other cmake projects tests fail to build when reconfigured, and require full rebuild
+	@${RM} -r ${BUILD_WRKSRC}/*
+
 .include <bsd.port.mk>