tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cmake support
On Thu, Mar 15, 2018 at 09:30:36AM -0500, Jason Bacon wrote:
> On 03/15/18 09:10, Frédéric Fauberteau wrote:
> > Le 2018-03-15 10:39, maya%netbsd.org@localhost a écrit :
> > > it's most interesting if no cmake package that worked before stops
> > > working :-)
> > > only need 1 OS to test this.
> >
> > Absolutely.
> > Actually, I had in mind to run a pbulk for all packages that implement
> > the 'CONFIGURE_DIRS=${WRKDIR}/build' trick... And I have now boxes to do
> > that! But yes, we don't care about the OS ;)
>
> Thanks guys! Let me know if there are any new patches available for
> testing. I'll try it out with our WIP ports ASAP, although that will likely
> be middle of next week as I'm tied up until Tues at least.
I have another patch to offer: using ninja instead of make as build
tool.
I've so far only tried it with wip/gnucash-devel, where it works fine.
Thomas
Index: configure/cmake.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/configure/cmake.mk,v
retrieving revision 1.15
diff -u -r1.15 cmake.mk
--- configure/cmake.mk 27 Dec 2017 18:56:27 -0000 1.15
+++ configure/cmake.mk 15 Mar 2018 23:20:35 -0000
@@ -3,6 +3,13 @@
# This file handles packages that use CMake as their primary build
# system. For more information about CMake, see http://www.cmake.org/.
#
+# === User-settable variables ===
+#
+# CMAKE_BUILD_TOOL
+# Tool to use for building package configured by cmake.
+# Supported: make, ninja
+# Default: make
+#
# === Package-settable variables ===
#
# CMAKE_DEPENDENCIES_REWRITE
@@ -56,6 +63,18 @@
. endif
.endif
+CMAKE_BUILD_TOOL?= make
+.if ${CMAKE_BUILD_TOOL} == "ninja"
+CMAKE_ARGS+= -GNinja
+BUILD_DEPENDS+= ninja-build-[0-9]*:../../devel/ninja-build
+
+do-build:
+ cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ninja
+
+do-install:
+ cd ${WRKSRC}; ${SETENV} ${INSTALL_ENV} ninja install
+.endif
+
.if defined(CMAKE_PREFIX_PATH)
CMAKE_ARGS+=-DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH:ts;:Q}
.endif
Home |
Main Index |
Thread Index |
Old Index