git: 595088e21e69 - main - net/cppzmq: add tests target, disabled by default

From: Vasil Dimov <vd_at_FreeBSD.org>
Date: Wed, 28 Sep 2022 09:16:47 UTC
The branch main has been updated by vd:

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

commit 595088e21e690407a1b69de76f6e2db676dc7d46
Author:     Vasil Dimov <vd@FreeBSD.org>
AuthorDate: 2022-09-28 09:14:15 +0000
Commit:     Vasil Dimov <vd@FreeBSD.org>
CommitDate: 2022-09-28 09:16:43 +0000

    net/cppzmq: add tests target, disabled by default
    
    PR:     266633
---
 net/cppzmq/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/cppzmq/Makefile b/net/cppzmq/Makefile
index 1b3f5d8d55af..57df43a60b76 100644
--- a/net/cppzmq/Makefile
+++ b/net/cppzmq/Makefile
@@ -13,12 +13,14 @@ LIB_DEPENDS=	libzmq.so:net/libzmq4
 
 NO_ARCH=	yes
 
-USES=		cmake pkgconfig
+USES=		cmake:testing pkgconfig
 CMAKE_ARGS=	--no-warn-unused-cli \
-		-DCPPZMQ_BUILD_TESTS:BOOL=OFF \
 		-DCPPZMQ_CMAKECONFIG_INSTALL_DIR:PATH="lib/cmake/${PORTNAME}" \
 		-Wno-dev
 
+CMAKE_OFF=	CPPZMQ_BUILD_TESTS
+CMAKE_TESTING_ON=	CPPZMQ_BUILD_TESTS # some tests fail intermittently, for example https://github.com/zeromq/cppzmq/issues/574
+
 # cppzmq is included in libzmq2
 CONFLICTS_INSTALL=	libzmq2