[Buildroot] [PATCH RFC 2/2] package/pkg-cmake.mk: use ninja instead of make

Adrian Perez de Castro aperez at igalia.com
Wed Jan 12 16:51:43 UTC 2022


Hi,

On Wed, 12 Jan 2022 15:35:16 +0100 Thomas Petazzoni <thomas.petazzoni at bootlin.com> wrote:
 
> On Wed, 12 Jan 2022 15:26:18 +0200
> Adrian Perez de Castro <aperez at igalia.com> wrote:
> 
> > Switch to ninja as the build tool for the CMake package infrastructure.
> > Note that the changes make packages which use [host-]cmake-package
> > depend on host-ninja.
> > 
> > Signed-off-by: Adrian Perez de Castro <aperez at igalia.com>
> > ---
> >  package/pkg-cmake.mk | 24 ++++++++++++++----------
> >  1 file changed, 14 insertions(+), 10 deletions(-)
> > 
> > diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> > index 3b1db35fb6..65f005a914 100644
> > --- a/package/pkg-cmake.mk
> > +++ b/package/pkg-cmake.mk
> > @@ -51,11 +51,6 @@ endif
> >  
> >  define inner-cmake-package
> >  
> > -$(2)_MAKE			?= $$(MAKE)
> > -$(2)_INSTALL_OPTS		?= install
> > -$(2)_INSTALL_STAGING_OPTS	?= DESTDIR=$$(STAGING_DIR) install/fast
> > -$(2)_INSTALL_TARGET_OPTS	?= DESTDIR=$$(TARGET_DIR) install/fast
> 
> This means an audit of all cmake-package packages need to be done to
> see if any of those variables is used.

I will be going through the packages in the next days, for now a couple
of notes on the ones you mentioned already, below.

> I could spot:
> 
> MUSEPACK_MAKE = $(MAKE1)

I fixed this locally using:

  MUSEPACK_NINJA_OPTS = -j1

Sadly, switching to Ninja does not fix parallel builds for this package.

> But also:
> 
> HOST_MARIADB_MAKE_OPTS = import_executables

Replacing with the following works, because the CMake Ninja generator also
produces top-level phony targets:

  HOST_MARIADB_NINJA_OPTS = import_executables

Both these tweaks (and likely a bunch more) will be part of v2 of the patch
set :)
 
Cheers,
—Adrián
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20220112/80a36be7/attachment-0001.asc>


More information about the buildroot mailing list