tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Skip building the test programs in parallel/threadingbuildingblocks
Hi,
The CMake in parallel/threadingbuildingblocks says to build the test
programs by default. But PKGSRC_RUN_TEST is NOT enabled by default. The
end result is: in the default configuration, we're building dozens of
executables which aren't even installed.
So, I think we can speed up the build significantly in the typical use
case by building the test programs iff we want to run the tests in the
first place. What do we think of my diff (attached) ?
I wonder if there are other, similar opportunities to take advantage of
situations like this when PKGSRC_RUN_TEST is disabled. Maybe we could
even automate it somewhat.
Charlotte
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/parallel/threadingbuildingblocks/Makefile,v
retrieving revision 1.13
diff -b -u -r1.13 Makefile
--- Makefile 1 Jul 2022 16:21:08 -0000 1.13
+++ Makefile 11 Aug 2022 06:52:43 -0000
@@ -2,6 +2,7 @@
DISTNAME= oneTBB-2021.5.0
PKGNAME= ${DISTNAME:S/oneTBB-/threadingbuildingblocks-/}
+PKGREVISION= 1
CATEGORIES= parallel
MASTER_SITES= ${MASTER_SITE_GITHUB:=oneapi-src/}
GITHUB_PROJECT= oneTBB
@@ -17,7 +18,13 @@
# Use one build directory across platforms.
CMAKE_ARGS+= -DTBB_OUTPUT_DIR_BASE=pkgsrc
CMAKE_ARGS+= -DTBB_STRICT=OFF
+
+.if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss])
TEST_TARGET= test
+.else
+CMAKE_ARGS+= -DTBB_TEST=OFF
+.endif
+
# For Darwin
TEST_ENV+= DYLD_LIBRARY_PATH=${WRKSRC}/pkgsrc_relwithdebinfo
Home |
Main Index |
Thread Index |
Old Index