Skip to contentSkip to conversation

Use Ninja as build tool for CMake-based packages

RFC PATCH Superseded Adrian Perez de Castro 5 participants 25 messages Jan 12, 2022 – Jul 24, 2022

lore
Share & tools
lore
#0 lore raw

cover Use Ninja as build tool for CMake-based packages

Hello everybody,

As discussed yesterday, here is a quick stab for testing and getting the conversation started about using Ninja for CMake-based packages (hence the missing documentation updates and the "RFC" tag in the subject :-D).

In order to avoid the circular dependency of host-ninja requiring itself, ninja.mk gets changed to use host-generic-package with a build command that plainly runs the compiler on the set of sources we know are needed to build a minimal usable version of it under Unix-y systems. This is basically the list of sources that CMake would have picked (as per the CMakeLists.txt file) passed straight to $(HOSTCXX).

The next change modifies pkg-cmake.mk to always pass -GNinja and removes the $(<PKG>_INSTALL[_STAGING,_TARGET]_OPTS) variables, because when using Ninja the "install/fast" targets are not generated by CMake (those are an internal detail of the Makefile generator, it seems). For consistency with the Meson package infrastructure variables $(NINJA), $(<PKG>_NINJA_ENV) and $(NINJA_OPTS) are honored by the default set of build/install commands.

Now, there might be packages that break with this, and I would be particularly concerned about things like packages which use CMake and build out-of-tree kernel modules (as the kernel build infrastructure is all Make, and only Make!) but the changes included were enough for me to get Raspberry Pi images built with WebKit (both GTK and WPE ports) in it, which results in the following built using [host-]cmake-package:

- brotli
- cog
- jpeg-turbo
- openjpeg
- webkitgtk
- webp
- woff2
- wpewebkit

While not a long list by any means, I think it shows a decent sample of packages coming from different development teams that work just fine switching to Ninja.

If anybody can suggest something with a bigger number of CMake packages to build (or a .config file to share) I will be more than happy to give it a test this with these patches applied :)

Cheers,
-Adrian

Adrian Perez de Castro (2):
package/ninja: do not require cmake
package/pkg-cmake.mk: use ninja instead of make

 package/ninja/ninja.mk | 36 +++++++++++++++++++++++++++++++++++-
 package/pkg-cmake.mk   | 24 ++++++++++++++----------
 2 files changed, 49 insertions(+), 11 deletions(-)
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

RFC PATCH 1/2 package/ninja: do not require cmake

Use host-generic-package to manually build ninja. This avoids the need for host-cmake in preparation for the CMake build system machinery being changed to use ninja instead of make.

---
 package/ninja/ninja.mk | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)
package/ninja/ninja.mk +35 -1
index ab1941023e..ae3be6a14f 100644
@@ -9,8 +9,42 @@ NINJA_SITE = $(call github,ninja-build,ninja,v$(NINJA_VERSION))
 NINJA_LICENSE = Apache-2.0
 NINJA_LICENSE_FILES = COPYING
 
+# Ninja is used by CMake-based packages, avoid a circular dependency by
+# by using host-generic-package instead and using a single command to
+# compile the binary. This does in essence the same as the "bootstrap.py"
+# included in the distribution avoiding the need for host-python.
+define HOST_NINJA_BUILD_CMDS
+	cd $(@D) && $(HOSTCXX) $(HOST_CXXFLAGS) $(HOST_LDFLAGS) \
+		src/build_log.cc \
+		src/build.cc \
+		src/clean.cc \
+		src/clparser.cc \
+		src/dyndep.cc \
+		src/dyndep_parser.cc \
+		src/debug_flags.cc \
+		src/deps_log.cc \
+		src/disk_interface.cc \
+		src/edit_distance.cc \
+		src/eval_env.cc \
+		src/graph.cc \
+		src/graphviz.cc \
+		src/line_printer.cc \
+		src/manifest_parser.cc \
+		src/metrics.cc \
+		src/parser.cc \
+		src/state.cc \
+		src/string_piece_util.cc \
+		src/util.cc \
+		src/version.cc \
+		src/depfile_parser.cc \
+		src/lexer.cc \
+		src/subprocess-posix.cc \
+		src/ninja.cc \
+		-o ninja
+endef
+
 define HOST_NINJA_INSTALL_CMDS
 	$(INSTALL) -m 0755 -D $(@D)/ninja $(HOST_DIR)/bin/ninja
 endef
 
-$(eval $(host-cmake-package))
+$(eval $(host-generic-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

v2 cover Use Ninja as build tool for CMake-based packages

Hi all,

Here's a new version of the patch set to use Ninja for all CMake packages. It is still incomplete (missing documentation, a couple of commits need better commit logs, etc.) so I will be still using the "RFC" tag =)

This is what I wrote when I sent the initial version:

Quoted 7 lines

In order to avoid the circular dependency of host-ninja requiring itself, ninja.mk gets changed to use host-generic-package with a build command that plainly runs the compiler on the set of sources we know are needed to build a minimal usable version of it under Unix-y systems. This is basically the list of sources that CMake would have picked (as per the CMakeLists.txt file) passed straight to $(HOSTCXX).

Quoted 6 lines

The next change modifies pkg-cmake.mk to always pass -GNinja and removes the $(<PKG>_INSTALL[_STAGING,_TARGET]_OPTS) variables, because when using Ninja the "install/fast" targets are not generated by CMake (those are an internal detail of the Makefile generator, it seems). For consistency with the Meson package infrastructure variables $(NINJA), $(<PKG>_NINJA_ENV) and $(NINJA_OPTS) are honored by the default set of build/install commands.

While the main changes remain the same, this v2 includes a few fixes for packages which were needed to make them build using Ninja, and much more
testing: out of the 306 packages which use CMake today, I have been able to successfully have 205 of them built. I will follow-up with another email commenting more on this, and with a defconfig attached.

At this point I am confident that we can get all the packages built with CMake without loss of functionality. Only 5 packages out of 205 needing minor tweaks is a *very* good sign, IMO.

Cheers,
-Adrian

Adrian Perez de Castro (7):
package/ninja: do not require cmake package/pkg-cmake.mk: use ninja instead of make package/musepack: use MUSEPACK_NINJA_OPTS package/mariadb: use HOST_MARIADB_NINJA_OPTS package/kf5/kf5-extra-cmake-modules: do not build documentation package/libcorrect: avoid multiple rules for same target package/racehound: add patch to support building with ninja

 .../kf5-extra-cmake-modules.mk                |   5 +
 package/libcorrect/libcorrect.mk              |   2 +
 package/mariadb/mariadb.mk                    |   2 +-
 package/musepack/musepack.mk                  |   2 +-
 package/ninja/ninja.mk                        |  36 +++++-
 package/pkg-cmake.mk                          |  24 ++--
 ...pport-non-Make-generators-e.g.-Ninja.patch | 112 ++++++++++++++++++
 7 files changed, 170 insertions(+), 13 deletions(-)
 create mode 100644 package/racehound/0002-CMake-Support-non-Make-generators-e.g.-Ninja.patch
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

RFC PATCH v2 1/7 package/ninja: do not require cmake

Use host-generic-package to manually build ninja. This avoids the need for host-cmake in preparation for the CMake build system machinery being changed to use ninja instead of make.

---
Changes v1 -> v2:
- No changes.

---
 package/ninja/ninja.mk | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)
package/ninja/ninja.mk +35 -1
index ab1941023e..ae3be6a14f 100644
@@ -9,8 +9,42 @@ NINJA_SITE = $(call github,ninja-build,ninja,v$(NINJA_VERSION))
 NINJA_LICENSE = Apache-2.0
 NINJA_LICENSE_FILES = COPYING
 
+# Ninja is used by CMake-based packages, avoid a circular dependency by
+# by using host-generic-package instead and using a single command to
+# compile the binary. This does in essence the same as the "bootstrap.py"
+# included in the distribution avoiding the need for host-python.
+define HOST_NINJA_BUILD_CMDS
+	cd $(@D) && $(HOSTCXX) $(HOST_CXXFLAGS) $(HOST_LDFLAGS) \
+		src/build_log.cc \
+		src/build.cc \
+		src/clean.cc \
+		src/clparser.cc \
+		src/dyndep.cc \
+		src/dyndep_parser.cc \
+		src/debug_flags.cc \
+		src/deps_log.cc \
+		src/disk_interface.cc \
+		src/edit_distance.cc \
+		src/eval_env.cc \
+		src/graph.cc \
+		src/graphviz.cc \
+		src/line_printer.cc \
+		src/manifest_parser.cc \
+		src/metrics.cc \
+		src/parser.cc \
+		src/state.cc \
+		src/string_piece_util.cc \
+		src/util.cc \
+		src/version.cc \
+		src/depfile_parser.cc \
+		src/lexer.cc \
+		src/subprocess-posix.cc \
+		src/ninja.cc \
+		-o ninja
+endef
+
 define HOST_NINJA_INSTALL_CMDS
 	$(INSTALL) -m 0755 -D $(@D)/ninja $(HOST_DIR)/bin/ninja
 endef
 
-$(eval $(host-cmake-package))
+$(eval $(host-generic-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

RFC PATCH v2 2/7 package/pkg-cmake.mk: use ninja instead of make

In reply to Adrian Perez de Castro

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.

---
Changes v1 -> v2:
- No changes.

---
 package/pkg-cmake.mk | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
package/pkg-cmake.mk +14 -10
index 3b1db35fb6..65f005a914 100644
@@ -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
-
 $(3)_SUPPORTS_IN_SOURCE_BUILD ?= YES
 
 
@@ -88,6 +83,7 @@ define $(2)_CONFIGURE_CMDS
 	rm -f CMakeCache.txt && \
 	PATH=$$(BR_PATH) \
 	$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
+		-GNinja \
 		-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/share/buildroot/toolchainfile.cmake" \
 		-DCMAKE_INSTALL_PREFIX="/usr" \
 		-DCMAKE_COLOR_MAKEFILE=OFF \
@@ -117,6 +113,7 @@ define $(2)_CONFIGURE_CMDS
 	PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
 	PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
 	$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
+		-GNinja \
 		-DCMAKE_INSTALL_SO_NO_EXE=0 \
 		-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
 		-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \
@@ -154,6 +151,8 @@ endif
 # primitives to find {C,LD}FLAGS, add it to the dependency list.
 $(2)_DEPENDENCIES += host-pkgconf
 
+$(2)_DEPENDENCIES += host-ninja
+
 $(2)_DEPENDENCIES += $(BR2_CMAKE_HOST_DEPENDENCY)
 
 #
@@ -163,11 +162,13 @@ $(2)_DEPENDENCIES += $(BR2_CMAKE_HOST_DEPENDENCY)
 ifndef $(2)_BUILD_CMDS
 ifeq ($(4),target)
 define $(2)_BUILD_CMDS
-	$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
+		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_BUILDDIR)
 endef
 else
 define $(2)_BUILD_CMDS
-	$$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
+		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_BUILDDIR)
 endef
 endif
 endif
@@ -178,7 +179,8 @@ endif
 #
 ifndef $(2)_INSTALL_CMDS
 define $(2)_INSTALL_CMDS
-	$$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_BUILDDIR) install
 endef
 endif
 
@@ -188,7 +190,8 @@ endif
 #
 ifndef $(2)_INSTALL_STAGING_CMDS
 define $(2)_INSTALL_STAGING_CMDS
-	$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_STAGING_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(STAGING_DIR) \
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_BUILDDIR) install
 endef
 endif
 
@@ -198,7 +201,8 @@ endif
 #
 ifndef $(2)_INSTALL_TARGET_CMDS
 define $(2)_INSTALL_TARGET_CMDS
-	$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_TARGET_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(TARGET_DIR) \
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_BUILDDIR) install
 endef
 endif
 
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

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

Quoted 45 lines · Adrian Perez de Castro

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.

---
Changes v1 -> v2:
- No changes.

---
  package/pkg-cmake.mk | 24 ++++++++++++++----------
  1 file changed, 14 insertions(+), 10 deletions(-)
package/pkg-cmake.mk +2 -5
index 3b1db35fb6..65f005a914 100644
@@ -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
-
  $(3)_SUPPORTS_IN_SOURCE_BUILD ?= YES
 
 
@@ -88,6 +83,7 @@ define $(2)_CONFIGURE_CMDS
  	rm -f CMakeCache.txt && \
  	PATH=$$(BR_PATH) \
  	$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
+		-GNinja \
  		-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/share/buildroot/toolchainfile.cmake" \
  		-DCMAKE_INSTALL_PREFIX="/usr" \
  		-DCMAKE_COLOR_MAKEFILE=OFF \
@@ -117,6 +113,7 @@ define $(2)_CONFIGURE_CMDS
  	PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
  	PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
  	$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
+		-GNinja \
  		-DCMAKE_INSTALL_SO_NO_EXE=0 \
  		-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
  		-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \

package/pkg-cmake.mk endif · line 154

Quoted 4 lines
package/pkg-cmake.mk +1 -0
@@ -154,6 +151,8 @@ endif
  # primitives to find {C,LD}FLAGS, add it to the dependency list.
  $(2)_DEPENDENCIES += host-pkgconf
 
+$(2)_DEPENDENCIES += host-ninja

Ah, crap, I forgot this one...

Maybe it's better after all to add

$(2)_CMAKE_GENERATOR ?= Ninja
ifeq ($($(2)_CMAKE_GENERATOR),Ninja)
$(2)_DEPENDENCIES += host-ninja
endif

package/pkg-cmake.mk $(2)_DEPENDENCIES += $(BR2_CMAKE_HOST_DEPENDENCY) · line 166

Quoted 11 lines
package/pkg-cmake.mk +3 -1
+
  $(2)_DEPENDENCIES += $(BR2_CMAKE_HOST_DEPENDENCY)
 
  #
@@ -163,11 +162,13 @@ $(2)_DEPENDENCIES += $(BR2_CMAKE_HOST_DEPENDENCY)
  ifndef $(2)_BUILD_CMDS
  ifeq ($(4),target)
  define $(2)_BUILD_CMDS
-	$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
+		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_BUILDDIR)

If cmake is used here instead of ninja directly, it doesn't make sense to have
a global <PKG>_CMAKE_OPTS (or whatever) any more, because the options for --build are completely different from those of --install. It does, however, make sense to add <PKG>_BUILD_OPTS, <PKG>_INSTALL_TARGET_OPTS, etc. (which we do have for a couple of other infras already). But that is pretty independent of this series.

Regards,
Arnout

Quoted 30 lines
package/pkg-cmake.mk +6 -3
  endef
  else
  define $(2)_BUILD_CMDS
-	$$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
+		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_BUILDDIR)
  endef
  endif
  endif
@@ -178,7 +179,8 @@ endif
  #
  ifndef $(2)_INSTALL_CMDS
  define $(2)_INSTALL_CMDS
-	$$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_BUILDDIR) install
  endef
  endif
 
@@ -188,7 +190,8 @@ endif
  #
  ifndef $(2)_INSTALL_STAGING_CMDS
  define $(2)_INSTALL_STAGING_CMDS
-	$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_STAGING_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(STAGING_DIR) \
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_BUILDDIR) install
  endef
  endif
 

package/pkg-cmake.mk endif · line 208

Quoted 9 lines
package/pkg-cmake.mk +2 -1
@@ -198,7 +201,8 @@ endif
  #
  ifndef $(2)_INSTALL_TARGET_CMDS
  define $(2)_INSTALL_TARGET_CMDS
-	$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_TARGET_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(TARGET_DIR) \
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_BUILDDIR) install
  endef
  endif
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#6 lore raw

RFC PATCH v2 3/7 package/musepack: use MUSEPACK_NINJA_OPTS

In reply to Adrian Perez de Castro

Replace the usage of MUSEPACK_MAKE with MUSEPACK_NINJA_OPTS to disable the parallel build. Unfortunately switching to Ninja for building CMake packages has not solved the parallel build issues.

---
Changes v1 -> v2:
- Tweak muspack package to disallow parallel builds with Ninja.

---
 package/musepack/musepack.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/musepack/musepack.mk +1 -1
index fc66c684a5..000db5fd76 100644
@@ -9,8 +9,8 @@ MUSEPACK_SITE = http://files.musepack.net/source
 MUSEPACK_SOURCE = musepack_src_$(MUSEPACK_VERSION).tar.gz
 MUSEPACK_DEPENDENCIES = libcuefile libreplaygain
 MUSEPACK_INSTALL_STAGING = YES
-MUSEPACK_MAKE = $(MAKE1)
 MUSEPACK_LICENSE = BSD-3-Clause (*mpcdec), LGPL-2.1+ (*mpcenc)
 MUSEPACK_LICENSE_FILES = libmpcdec/COPYING libmpcenc/quant.c
+MUSEPACK_NINJA_OPTS = -j1
 
 $(eval $(cmake-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

Re: [Buildroot] [PATCH RFC v2 3/7] package/musepack: use MUSEPACK_NINJA_OPTS

Quoted 17 lines · Adrian Perez de Castro

Replace the usage of MUSEPACK_MAKE with MUSEPACK_NINJA_OPTS to disable the parallel build. Unfortunately switching to Ninja for building CMake packages has not solved the parallel build issues.

---
Changes v1 -> v2:
- Tweak muspack package to disallow parallel builds with Ninja.

---
  package/musepack/musepack.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
package/musepack/musepack.mk +0 -0
index fc66c684a5..000db5fd76 100644

package/musepack/musepack.mk MUSEPACK_SITE = http://files.musepack.net/source · line 14

Quoted 7 lines
package/musepack/musepack.mk +1 -1
@@ -9,8 +9,8 @@ MUSEPACK_SITE = http://files.musepack.net/source
  MUSEPACK_SOURCE = musepack_src_$(MUSEPACK_VERSION).tar.gz
  MUSEPACK_DEPENDENCIES = libcuefile libreplaygain
  MUSEPACK_INSTALL_STAGING = YES
-MUSEPACK_MAKE = $(MAKE1)
  MUSEPACK_LICENSE = BSD-3-Clause (*mpcdec), LGPL-2.1+ (*mpcenc)
  MUSEPACK_LICENSE_FILES = libmpcdec/COPYING libmpcenc/quant.c
+MUSEPACK_NINJA_OPTS = -j1

Ah, right, for something like this we *do* need <PKG>_BUILD_OPTS...

Regards,
Arnout

package/musepack/musepack.mk MUSEPACK_SITE = http://files.musepack.net/source · line 16

Quoted 2 lines
package/musepack/musepack.mk +0 -0
  $(eval $(cmake-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#8 lore raw

RFC PATCH v2 4/7 package/mariadb: use HOST_MARIADB_NINJA_OPTS

In reply to Adrian Perez de Castro

Replace usage of HOST_MARIADB_MAKE_OPTS with HOST_MARIADB_NINJA_OPTS.

---
Changes v1 -> v2:
- Tweeak to use CMake+Ninja infra.

---
 package/mariadb/mariadb.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/mariadb/mariadb.mk +1 -1
index db967ca3ed..d24174dd74 100644
@@ -101,7 +101,7 @@ HOST_MARIADB_CONF_OPTS += -DWITH_SSL=system
 # -DIMPORT_EXECUTABLES=$(HOST_MARIADB_BUILDDIR)/import_executables.cmake
 # must then be passed to cmake during target build.
 # see also https://mariadb.com/kb/en/mariadb/cross-compiling-mariadb/
-HOST_MARIADB_MAKE_OPTS = import_executables
+HOST_MARIADB_NINJA_OPTS = import_executables
 
 MARIADB_CONF_OPTS += \
 	-DIMPORT_EXECUTABLES=$(HOST_MARIADB_BUILDDIR)/import_executables.cmake
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

RFC PATCH v2 5/7 package/kf5/kf5-extra-cmake-modules: do not build documentation

In reply to Adrian Perez de Castro

Pass needed CMake options to disable generating documentations. The documentation is built using python-sphinx, which is not packaged in Buildroot.

Prior to this change, if the build host would have a Python installation with the sphinx module installed the automatic detection tried to build documentation, which would fail in cases where the sphinxcontrib-qthelp package is missing from the host Python installation. The error message in this case was:

Extension error:
Could not import extension ecm (exception: cannot import name
'htmlescape' from 'sphinx.util.pycompat' (/usr/lib/python3.10/site-packages/sphinx/util/pycompat.py))

---
Changes v1 -> v2:
- Add CMake options to skip trying to build documentation.

---
 .../kf5/kf5-extra-cmake-modules/kf5-extra-cmake-modules.mk   | 5 +++++
 1 file changed, 5 insertions(+)
package/kf5/kf5-extra-cmake-modules/kf5-extra-cmake-modules.mk +5 -0
index 3c4281b960..ba2748456e 100644
@@ -14,4 +14,9 @@ KF5_EXTRA_CMAKE_MODULES_DEPENDENCIES = host-pkgconf
 KF5_EXTRA_CMAKE_MODULES_INSTALL_STAGING = YES
 KF5_EXTRA_CMAKE_MODULES_INSTALL_TARGET = NO
 
+KF5_EXTRA_CMAKE_MODULES_CONF_OPTS += \
+	-DBUILD_HTML_DOCS=OFF \
+	-DBUILD_MAN_DOCS=OFF \
+	-DBUILD_QTHELP_DOCS=OFF
+
 $(eval $(cmake-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#10 lore raw

RFC PATCH v2 6/7 package/libcorrect: avoid multiple rules for same target

In reply to Adrian Perez de Castro

---
Changes v1 -> v2:
- Avoid CMake generating two targets with the same name. Needs a better fix sent upstream to tweak CMakeLists.txt instead.

---
 package/libcorrect/libcorrect.mk | 2 ++
 1 file changed, 2 insertions(+)
package/libcorrect/libcorrect.mk +2 -0
index 0a84aa5c26..225111a64f 100644
@@ -10,4 +10,6 @@ LIBCORRECT_LICENSE = BSD-3-Clause
 LIBCORRECT_LICENSE_FILES = LICENSE
 LIBCORRECT_INSTALL_STAGING = YES
 
+LIBCORRECT_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF
+
 $(eval $(cmake-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#11 lore raw

RFC PATCH v2 7/7 package/racehound: add patch to support building with ninja

In reply to Adrian Perez de Castro

SSIA.

Upstream-Status: https://github.com/euspectre/racehound/pull/6
---
Changes v1 -> v2:
- Patch added to call into Kbuild with plain make.

---
 ...pport-non-Make-generators-e.g.-Ninja.patch | 112 ++++++++++++++++++
 1 file changed, 112 insertions(+)
 create mode 100644 package/racehound/0002-CMake-Support-non-Make-generators-e.g.-Ninja.patch
package/racehound/0002-CMake-Support-non-Make-generators-e.g.-Ninja.patch new file +112 -0
new file mode 100644
index 0000000000..7f90fb8c69
@@ -0,0 +1,112 @@
+From f8d266b017fd76e2de9d20e0bb3951a5338075d1 Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <[email protected]>
+Date: Fri, 14 Jan 2022 14:33:21 +0200
+Subject: [PATCH] CMake: Support non-Make generators, e.g. Ninja
+
+---
+ cmake/modules/FindKbuild.cmake             | 15 +++++++++++++--
+ cmake/modules/kbuild_system.cmake          |  4 ++--
+ cmake/modules/kmodule_files/CMakeLists.txt | 11 +++++++++--
+ core/tests/common_target/CMakeLists.txt    |  2 +-
+ 4 files changed, 25 insertions(+), 7 deletions(-)
+
+diff --git a/cmake/modules/FindKbuild.cmake b/cmake/modules/FindKbuild.cmake
+index b79d140..2ba0a78 100644
+--- a/cmake/modules/FindKbuild.cmake
++++ b/cmake/modules/FindKbuild.cmake
+@@ -5,6 +5,7 @@
+ #     (often /lib/modules/${KBUILD_VERSION_STRING}/build)
+ # KBUILD_INCLUDE_DIR - not used
+ # KBUILD_FOUND - TRUE if everything is correct, FALSE otherwise
++# KBUILD_MAKE_COMMAND - Command to run for Make invocations.
+ 
+ if (NOT KBUILD_VERSION_STRING)
+ 	set(KBUILD_VERSION_STRING ${CMAKE_SYSTEM_VERSION} CACHE STRING 
+@@ -18,8 +19,18 @@ endif (NOT KBUILD_BUILD_DIR)
+ 
+ set(KBUILD_INCLUDE_DIRS "NOT USED")
+ 
+-# Note: only KBUILD_BUILD_DIR variable is really used in the project.
+-# Other variables defined only for FindModule architecture of CMake.
++# Only makefiles have $(MAKE) defined, in other cases invoke make directly.
++if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
++    set(KBUILD_MAKE_COMMAND $\(MAKE\))
++else ()
++    find_program(KBUILD_MAKE_COMMAND make REQUIRED)
++    set(KBUILD_MAKE_COMMAND ${KBUILD_MAKE_COMMAND} CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS})
++endif ()
++
++
++# Note: only KBUILD_BUILD_DIR and KBUILD_MAKE_COMMAND variables are really
++# used in the project. Other variables defined only for FindModule
++# architecture of CMake.
+ 
+ # Handle the QUIETLY and REQUIRED arguments and set KBUILD_FOUND to TRUE if 
+ # all listed variables are TRUE
+diff --git a/cmake/modules/kbuild_system.cmake b/cmake/modules/kbuild_system.cmake
+index e28ef33..e4e33df 100644
+--- a/cmake/modules/kbuild_system.cmake
++++ b/cmake/modules/kbuild_system.cmake
+@@ -262,13 +262,13 @@ function(kbuild_add_module name)
+ 					> "${_dir}.${_name}.o.cmd")
+ 		endforeach(shipped_source_noext_abs ${shipped_source_noext_abs})
+ 	endif(shipped_sources_noext_abs)
+-	
++
+ 	# The rule to create module
+ 	add_custom_command(
+ 		OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}.ko ${symvers_file}
+ 		${cmd_create_command}
+ 		${symvers_command}
+-		COMMAND $(MAKE) -C ${KBUILD_BUILD_DIR}
++		COMMAND ${KBUILD_MAKE_COMMAND} -C ${KBUILD_BUILD_DIR}
+ 			M=${CMAKE_CURRENT_BINARY_DIR} modules
+ 		DEPENDS ${depend_files}
+ 	)
+diff --git a/cmake/modules/kmodule_files/CMakeLists.txt b/cmake/modules/kmodule_files/CMakeLists.txt
+index 1147cc5..6115153 100644
+--- a/cmake/modules/kmodule_files/CMakeLists.txt
++++ b/cmake/modules/kmodule_files/CMakeLists.txt
+@@ -5,7 +5,7 @@ if (NOT KERNELDIR)
+ 	set(KERNELDIR /lib/modules/${KBUILD_VERSION_STRING}/build)
+ endif (NOT KERNELDIR)
+ 
+-set(PWD $\(shell pwd\))
++set(PWD $$\(pwd\))
+ 
+ project(kmodule_try_compile)
+ # Create rule for produce file from another file via copiing
+@@ -27,9 +27,16 @@ if(COPY_FILE)
+ 	copy_file("${COPY_FILE}" "${CMAKE_CURRENT_BINARY_DIR}/try_compile.ko")
+ endif(COPY_FILE)
+ 
++# Only makefiles have $(MAKE) defined, in other cases invoke make directly.
++if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
++    set(KBUILD_MAKE_COMMAND $\(MAKE\))
++else ()
++    find_program(KBUILD_MAKE_COMMAND make REQUIRED)
++endif ()
++
+ # Rule to produce try_compile.ko from try_compile.c
+ add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/try_compile.ko"
+-	COMMAND $(MAKE) -C ${KERNELDIR} M=${PWD} modules
++	COMMAND ${KBUILD_MAKE_COMMAND} -C ${KERNELDIR} M=${PWD} modules
+ 					DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/try_compile.c")
+ 
+ # Kbuild system cannot work with out-of-source build,
+diff --git a/core/tests/common_target/CMakeLists.txt b/core/tests/common_target/CMakeLists.txt
+index cf257ad..fe48e68 100644
+--- a/core/tests/common_target/CMakeLists.txt
++++ b/core/tests/common_target/CMakeLists.txt
+@@ -17,7 +17,7 @@ add_custom_target("common_target_module"
+ 
+ add_custom_command(
+ 	OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${KMODULE_NAME}.ko"
+-	COMMAND $(MAKE) -f module.makefile
++	COMMAND ${KBUILD_MAKE_COMMAND} -f module.makefile
+ 	DEPENDS 
+ 		"${CMAKE_CURRENT_BINARY_DIR}/cfake.c"
+ 		"${CMAKE_CURRENT_BINARY_DIR}/cfake.h"
+-- 
+2.34.1
+
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#12 lore raw
In reply to Adrian Perez de Castro

Hello,

Quoted 26 lines · On Fri, 21 Jan 2022 17:42:28 +0200 Adrian Perez de Castro <[email protected]>…

Here's a new version of the patch set to use Ninja for all CMake packages. It is still incomplete (missing documentation, a couple of commits need better commit logs, etc.) so I will be still using the "RFC" tag =)

This is what I wrote when I sent the initial version:

Quoted 7 lines

In order to avoid the circular dependency of host-ninja requiring itself, ninja.mk gets changed to use host-generic-package with a build command that plainly runs the compiler on the set of sources we know are needed to build a minimal usable version of it under Unix-y systems. This is basically the list of sources that CMake would have picked (as per the CMakeLists.txt file) passed straight to $(HOSTCXX).

Quoted 6 lines

The next change modifies pkg-cmake.mk to always pass -GNinja and removes the $(<PKG>_INSTALL[_STAGING,_TARGET]_OPTS) variables, because when using Ninja the "install/fast" targets are not generated by CMake (those are an internal detail of the Makefile generator, it seems). For consistency with the Meson package infrastructure variables $(NINJA), $(<PKG>_NINJA_ENV) and $(NINJA_OPTS) are honored by the default set of build/install commands.

While the main changes remain the same, this v2 includes a few fixes for packages which were needed to make them build using Ninja, and much more
testing: out of the 306 packages which use CMake today, I have been able to successfully have 205 of them built. I will follow-up with another email commenting more on this, and with a defconfig attached.

Quoted 3 lines

At this point I am confident that we can get all the packages built with CMake without loss of functionality. Only 5 packages out of 205 needing minor tweaks is a *very* good sign, IMO.

You can find two files attached to this mail:

- v2-status.txt: lists all the CMake packages, marked with the following symbols:

- [ ] - Package not yet tested.
- [*] - Package tested, builds fine unchanged.
- [=] - Package tested, builds with changes/patches applied.
- [?] - Package tested, failed to build but the failure does not seem caused from switching from Make to Ninja.

- qemu_x86_64_cmakeninja1_defconfig: a defconfig that can be used to build all the packages marked with [*] from the status list.

I will need some other different defconfigs to test some of the packages, because they may be platform specific (like rpi-firmware) or need options enabled which conflict with other packages from the list.

My plan is to continue in the next weeks and slowly get to the point where all the CMake packages can be built using Ninja, using the minimum amount of defconfigs possible.

Cheers,
-Adrian

BR2_x86_64=y
BR2_CCACHE=y
BR2_OPTIMIZE_2=y
BR2_SSP_ALL=y
BR2_FORTIFY_SOURCE_2=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_SYSTEM_DHCP="eth0" BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux.config" BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y BR2_PACKAGE_FLUIDSYNTH=y
BR2_PACKAGE_FLUIDSYNTH_SDL2=y
BR2_PACKAGE_GSTREAMER1=y
# BR2_PACKAGE_GSTREAMER1_GST_DEBUG is not set BR2_PACKAGE_GST1_PLUGINS_BASE=y
BR2_PACKAGE_MUSEPACK=y
BR2_PACKAGE_YMPD=y
BR2_PACKAGE_UNZIP=y
BR2_PACKAGE_SENTRY_NATIVE=y
BR2_PACKAGE_TCF_AGENT=y
BR2_PACKAGE_JQ=y
BR2_PACKAGE_FIRMWARE_UTILS=y
BR2_PACKAGE_UNIONFS=y
BR2_PACKAGE_FLARE_ENGINE=y
BR2_PACKAGE_FLARE_GAME=y
BR2_PACKAGE_LUGARU=y
BR2_PACKAGE_MINETEST=y
BR2_PACKAGE_SOLARUS=y
BR2_PACKAGE_SUPERTUX=y
BR2_PACKAGE_SUPERTUXKART=y
BR2_PACKAGE_MESA3D_DEMOS=y
BR2_PACKAGE_MIDORI=y
BR2_PACKAGE_CEGUI=y
BR2_PACKAGE_FREERDP=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_CROCUS=y BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL=y BR2_PACKAGE_MESA3D_OPENGL_GLX=y BR2_PACKAGE_MESA3D_OPENGL_EGL=y BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_SDL2_KMSDRM=y
BR2_PACKAGE_SDL2_OPENGLES=y
BR2_PACKAGE_VULKAN_HEADERS=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_OPENGL=y BR2_PACKAGE_QT5BASE_OPENGL_ES2=y BR2_PACKAGE_QT5BASE_PNG=y
BR2_PACKAGE_QT5BASE_ICU=y
BR2_PACKAGE_QT5LOCATION=y
BR2_PACKAGE_QT5SENSORS=y
BR2_PACKAGE_QT5TOOLS=y BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS=y BR2_PACKAGE_CUTELYST=y
BR2_PACKAGE_GRANTLEE=y
BR2_PACKAGE_KF5=y
BR2_PACKAGE_KF5_MODEMMANAGER_QT=y BR2_PACKAGE_KF5_NETWORKMANAGER_QT=y
BR2_PACKAGE_QJSON=y
BR2_PACKAGE_SIMPLE_MAIL=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XSERVER_XORG_SERVER=y BR2_PACKAGE_XDRIVER_XF86_INPUT_LIBINPUT=y BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL=y BR2_PACKAGE_APITRACE=y
BR2_PACKAGE_BRICKD=y
BR2_PACKAGE_CDRKIT=y
BR2_PACKAGE_LIBIEC61850=y
BR2_PACKAGE_LINUX_SERIAL_TEST=y BR2_PACKAGE_OPENFPGALOADER=y
BR2_PACKAGE_OPENPOWERLINK=y
BR2_PACKAGE_READ_EDID=y
BR2_PACKAGE_UBUS=y
BR2_PACKAGE_LUAJIT_COMPAT52=y
BR2_PACKAGE_EASYDBUS=y
BR2_PACKAGE_LUA_EV=y
BR2_PACKAGE_LUA_SDL2=y
BR2_PACKAGE_LUVI=y
BR2_PACKAGE_PYTHON3_BZIP2=y
BR2_PACKAGE_PYTHON3_PYEXPAT=y
BR2_PACKAGE_PYTHON3_XZ=y
BR2_PACKAGE_PYTHON3_ZLIB=y BR2_PACKAGE_PYTHON_FLATBUFFERS=y BR2_PACKAGE_PYTHON_MAKO=y
BR2_PACKAGE_PYTHON_PAHO_MQTT=y BR2_PACKAGE_PYTHON_PYBIND=y
BR2_PACKAGE_ALURE=y
BR2_PACKAGE_BCG729=y
BR2_PACKAGE_LIBASPLIB=y
BR2_PACKAGE_LIBCODEC2=y
BR2_PACKAGE_LIBCUE=y
BR2_PACKAGE_LIBEBUR128=y
BR2_PACKAGE_LIBSOXR=y
BR2_PACKAGE_SPEEXDSP=y
BR2_PACKAGE_TAGLIB=y
BR2_PACKAGE_SNAPPY=y
BR2_PACKAGE_ZLIB_NG=y
BR2_PACKAGE_ZZIPLIB=y
BR2_PACKAGE_LIBOLM=y
BR2_PACKAGE_LIBSSH=y
BR2_PACKAGE_LIBSSH_SERVER=y
BR2_PACKAGE_LIBUECC=y
BR2_PACKAGE_USTREAM_SSL=y
BR2_PACKAGE_CPPDB=y
BR2_PACKAGE_LEVELDB=y
BR2_PACKAGE_LIBGIT2=y
BR2_PACKAGE_LIBMDBX=y
BR2_PACKAGE_LIBMDBX_CXX=y
BR2_PACKAGE_MYSQL=y
BR2_PACKAGE_MARIADB=y
BR2_PACKAGE_EXIV2=y
BR2_PACKAGE_GRAPHITE2=y
BR2_PACKAGE_INTEL_MEDIASDK=y
BR2_PACKAGE_JASPER=y
BR2_PACKAGE_LENSFUN=y
BR2_PACKAGE_LENSFUN_TOOLS=y
BR2_PACKAGE_LIBGTA=y
BR2_PACKAGE_LIBGTK3=y
# BR2_PACKAGE_LIBGTK3_BROADWAY is not set BR2_PACKAGE_OPENCV4=y
BR2_PACKAGE_OPENCV4_LIB_FLANN=y BR2_PACKAGE_OPENCV4_JPEG2000_WITH_OPENJPEG=y BR2_PACKAGE_POPPLER=y
BR2_PACKAGE_POPPLER_QT5=y
BR2_PACKAGE_WAFFLE=y
BR2_PACKAGE_WAYLANDPP=y
BR2_PACKAGE_ZXING_CPP=y
BR2_PACKAGE_C_PERIPHERY=y
BR2_PACKAGE_HACKRF=y
BR2_PACKAGE_LET_ME_CREATE=y
BR2_PACKAGE_LIBCEC=y
BR2_PACKAGE_LIBFTDI1_LIBFTDIPP1=y
BR2_PACKAGE_LIBIIO=y
BR2_PACKAGE_LIBIQRF=y
BR2_PACKAGE_LIBSIGROK=y
BR2_PACKAGE_LIBSIGROKCXX=y
BR2_PACKAGE_MRAA=y
BR2_PACKAGE_CJSON=y
BR2_PACKAGE_JSON_FOR_MODERN_CPP=y
BR2_PACKAGE_RAPIDJSON=y
BR2_PACKAGE_TINYXML2=y
BR2_PACKAGE_VALIJSON=y
BR2_PACKAGE_XERCES=y
BR2_PACKAGE_YAJL=y
BR2_PACKAGE_YAML_CPP=y
BR2_PACKAGE_GLOG=y
BR2_PACKAGE_LOG4CXX=y
BR2_PACKAGE_LOG4QT=y
BR2_PACKAGE_BENTO4=y
BR2_PACKAGE_LIBMATROSKA=y
BR2_PACKAGE_LIBYUV=y
BR2_PACKAGE_X265=y
BR2_PACKAGE_X265_CLI=y
BR2_PACKAGE_AZURE_IOT_SDK_C=y
BR2_PACKAGE_CURLPP=y
BR2_PACKAGE_GRPC=y
BR2_PACKAGE_LIBCGI=y
# BR2_PACKAGE_LIBCURL_EXTRA_PROTOCOLS_FEATURES is not set BR2_PACKAGE_LIBCURL_MBEDTLS=y
BR2_PACKAGE_LIBMINIUPNPC=y
BR2_PACKAGE_LIBNETCONF2=y
BR2_PACKAGE_LIBRSYNC=y
BR2_PACKAGE_LIBUHTTPD=y
BR2_PACKAGE_LIBURIPARSER=y
BR2_PACKAGE_LIBUWSC=y
BR2_PACKAGE_LIBVNCSERVER=y
BR2_PACKAGE_NANOMSG=y
BR2_PACKAGE_PAHO_MQTT_CPP=y
BR2_PACKAGE_PISTACHE=y
BR2_PACKAGE_QPID_PROTON=y
BR2_PACKAGE_RABBITMQ_C=y
BR2_PACKAGE_SYSREPO=y
BR2_PACKAGE_THRIFT=y
BR2_PACKAGE_WAMPCC=y
BR2_PACKAGE_WEBSOCKETPP=y
BR2_PACKAGE_ARMADILLO=y
BR2_PACKAGE_AVRO_C=y
BR2_PACKAGE_BOOST_RANDOM=y
BR2_PACKAGE_CCTZ=y
BR2_PACKAGE_CEREAL=y
BR2_PACKAGE_CLANG=y
BR2_PACKAGE_CMOCKA=y
BR2_PACKAGE_EIGEN=y
BR2_PACKAGE_ELFUTILS=y
BR2_PACKAGE_FLANN=y
BR2_PACKAGE_FLATCC=y
BR2_PACKAGE_GFLAGS=y
BR2_PACKAGE_GLI=y
BR2_PACKAGE_GTEST=y
BR2_PACKAGE_GTEST_GMOCK=y
BR2_PACKAGE_LIBB64=y
BR2_PACKAGE_LIBCORRECT=y
BR2_PACKAGE_LIBEASTL=y
BR2_PACKAGE_LIBGEOS=y
BR2_PACKAGE_LIBICAL=y
BR2_PACKAGE_LIBKS=y
BR2_PACKAGE_LIBOSMIUM=y
BR2_PACKAGE_LIBSPATIALINDEX=y
BR2_PACKAGE_LIBUCI=y
BR2_PACKAGE_MSGPACK=y
BR2_PACKAGE_QHULL=y
BR2_PACKAGE_UVW=y
BR2_PACKAGE_UTF8PROC=y
BR2_PACKAGE_COLLECTD=y
BR2_PACKAGE_COLLECTD_REDIS=y BR2_PACKAGE_GNURADIO_CTRLPORT=y BR2_PACKAGE_GNURADIO_DTV=y
BR2_PACKAGE_GNURADIO_PYTHON=y BR2_PACKAGE_GNURADIO_UTILS=y BR2_PACKAGE_GNURADIO_ZEROMQ=y BR2_PACKAGE_GNURADIO_CHANNELS=y BR2_PACKAGE_GNURADIO_QTGUI=y BR2_PACKAGE_GNURADIO_TRELLIS=y
BR2_PACKAGE_GNURADIO_UHD=y
BR2_PACKAGE_GQRX=y
BR2_PACKAGE_GR_OSMOSDR_PYTHON=y BR2_PACKAGE_GR_OSMOSDR_IQFILE=y BR2_PACKAGE_GR_OSMOSDR_RTLSDR=y BR2_PACKAGE_GR_OSMOSDR_RTLSDR_TCP=y BR2_PACKAGE_GR_OSMOSDR_RFSPACE=y
BR2_PACKAGE_RTL_433=y
BR2_PACKAGE_TASKD=y
BR2_PACKAGE_CANNELLONI=y
BR2_PACKAGE_EASYFRAMES=y
BR2_PACKAGE_GERBERA=y
BR2_PACKAGE_HIAWATHA=y
BR2_PACKAGE_I2PD=y
BR2_PACKAGE_LINPHONE=y
BR2_PACKAGE_MJPG_STREAMER=y
BR2_PACKAGE_MRP=y
BR2_PACKAGE_NETWORK_MANAGER=y BR2_PACKAGE_NETWORK_MANAGER_TUI=y BR2_PACKAGE_NETWORK_MANAGER_MODEM_MANAGER=y BR2_PACKAGE_ODHCP6C=y
BR2_PACKAGE_OPENOBEX=y
BR2_PACKAGE_SNORT3=y
BR2_PACKAGE_SPICE_PROTOCOL=y
BR2_PACKAGE_UHTTPD=y
BR2_PACKAGE_UQMI=y
BR2_PACKAGE_ZNC=y
BR2_PACKAGE_RTTY=y
BR2_PACKAGE_TTYD=y
BR2_PACKAGE_UTIL_LINUX_BINARIES=y BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_FATCAT=y
BR2_PACKAGE_HOST_LLD=y BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y

[*] package/alure/alure.mk
[*] package/apitrace/apitrace.mk
[*] package/armadillo/armadillo.mk
[*] package/avro-c/avro-c.mk
[*] package/azure-iot-sdk-c/azure-iot-sdk-c.mk
[*] package/bcg729/bcg729.mk
[*] package/bctoolbox/bctoolbox.mk
[*] package/belle-sip/belle-sip.mk
[*] package/belr/belr.mk
[*] package/bento4/bento4.mk
[*] package/brickd/brickd.mk
[*] package/brotli/brotli.mk
[*] package/c-periphery/c-periphery.mk
[*] package/cannelloni/cannelloni.mk
[*] package/cctz/cctz.mk
[*] package/cdrkit/cdrkit.mk
[*] package/cegui/cegui.mk
[*] package/cereal/cereal.mk
[*] package/cfm/cfm.mk
[*] package/cjson/cjson.mk
[*] package/clang/clang.mk
[*] package/cmake/cmake.mk
[*] package/cmocka/cmocka.mk
[*] package/cog/cog.mk
[*] package/cppdb/cppdb.mk
[*] package/cppzmq/cppzmq.mk
[*] package/curlpp/curlpp.mk
[*] package/cutelyst/cutelyst.mk
[*] package/doxygen/doxygen.mk
[*] package/easydbus/easydbus.mk
[*] package/easyframes/easyframes.mk
[*] package/eigen/eigen.mk
[*] package/exiv2/exiv2.mk
[*] package/fatcat/fatcat.mk
[*] package/firmware-utils/firmware-utils.mk
[*] package/flann/flann.mk
[*] package/flare-engine/flare-engine.mk
[*] package/flare-game/flare-game.mk
[*] package/flatbuffers/flatbuffers.mk
[*] package/flatcc/flatcc.mk
[*] package/fluidsynth/fluidsynth.mk
[*] package/fmt/fmt.mk
[*] package/freerdp/freerdp.mk
[*] package/gerbera/gerbera.mk
[*] package/gflags/gflags.mk
[*] package/gli/gli.mk
[*] package/glm/glm.mk
[*] package/glog/glog.mk
[*] package/gnuradio/gnuradio.mk
[*] package/gqrx/gqrx.mk
[*] package/gr-osmosdr/gr-osmosdr.mk
[*] package/grantlee/grantlee.mk
[*] package/graphite2/graphite2.mk
[*] package/grpc/grpc.mk
[*] package/gtest/gtest.mk
[*] package/hackrf/hackrf.mk
[*] package/hiawatha/hiawatha.mk
[*] package/hiredis/hiredis.mk
[*] package/i2pd/i2pd.mk
[*] package/intel-gmmlib/intel-gmmlib.mk
[*] package/intel-mediadriver/intel-mediadriver.mk
[*] package/intel-mediasdk/intel-mediasdk.mk
[*] package/jasper/jasper.mk
[*] package/jpeg-turbo/jpeg-turbo.mk
[*] package/json-c/json-c.mk
[*] package/json-for-modern-cpp/json-for-modern-cpp.mk
[*] package/kf5/kf5-extra-cmake-modules/kf5-extra-cmake-modules.mk [*] package/kf5/kf5-kcoreaddons/kf5-kcoreaddons.mk
[*] package/kf5/kf5-modemmanager-qt/kf5-modemmanager-qt.mk
[*] package/kf5/kf5-networkmanager-qt/kf5-networkmanager-qt.mk [*] package/lapack/lapack.mk
[*] package/lensfun/lensfun.mk
[*] package/let-me-create/let-me-create.mk
[*] package/leveldb/leveldb.mk
[*] package/libabseil-cpp/libabseil-cpp.mk
[*] package/libasplib/libasplib.mk
[*] package/libcec/libcec.mk
[*] package/libcgi/libcgi.mk
[*] package/libcodec2/libcodec2.mk
[*] package/libcue/libcue.mk
[*] package/libcuefile/libcuefile.mk
[*] package/libeastl/libeastl.mk
[*] package/libebml/libebml.mk
[*] package/libebur128/libebur128.mk
[*] package/libftdi1/libftdi1.mk
[*] package/libgeos/libgeos.mk
[*] package/libgit2/libgit2.mk
[*] package/libgta/libgta.mk
[*] package/libical/libical.mk
[*] package/libiec61850/libiec61850.mk
[*] package/libiio/libiio.mk
[*] package/libiqrf/libiqrf.mk
[*] package/libks/libks.mk
[*] package/libmatroska/libmatroska.mk
[*] package/libmdbx/libmdbx.mk
[*] package/libminiupnpc/libminiupnpc.mk
[*] package/libnetconf2/libnetconf2.mk
[*] package/libolm/libolm.mk
[*] package/libosmium/libosmium.mk
[*] package/libplatform/libplatform.mk
[*] package/librsync/librsync.mk
[*] package/librtlsdr/librtlsdr.mk
[*] package/libssh/libssh.mk
[*] package/libubox/libubox.mk
[*] package/libuci/libuci.mk
[*] package/libuecc/libuecc.mk
[*] package/libuhttpd/libuhttpd.mk
[*] package/liburiparser/liburiparser.mk
[*] package/libvncserver/libvncserver.mk
[*] package/libwebsockets/libwebsockets.mk
[*] package/libyuv/libyuv.mk
[*] package/libzip/libzip.mk
[*] package/linphone/linphone.mk
[*] package/linux-serial-test/linux-serial-test.mk
[*] package/lld/lld.mk
[*] package/llvm/llvm.mk
[*] package/log4cxx/log4cxx.mk
[*] package/log4qt/log4qt.mk
[*] package/lua-ev/lua-ev.mk
[*] package/lua-sdl2/lua-sdl2.mk
[*] package/luv/luv.mk
[*] package/luvi/luvi.mk
[*] package/lzlib/lzlib.mk
[*] package/lzo/lzo.mk
[*] package/mariadb/mariadb.mk
[*] package/mbedtls/mbedtls.mk
[*] package/mediastreamer/mediastreamer.mk
[*] package/midori/midori.mk
[*] package/mjpg-streamer/mjpg-streamer.mk
[*] package/mraa/mraa.mk
[*] package/mrp/mrp.mk
[*] package/msgpack/msgpack.mk
[*] package/musepack/musepack.mk
[*] package/nanomsg/nanomsg.mk
[*] package/odhcp6c/odhcp6c.mk
[*] package/openal/openal.mk
[*] package/opencv4/opencv4.mk
[*] package/openjpeg/openjpeg.mk
[*] package/openobex/openobex.mk
[*] package/openpowerlink/openpowerlink.mk
[*] package/ortp/ortp.mk
[*] package/paho-mqtt-c/paho-mqtt-c.mk
[*] package/paho-mqtt-cpp/paho-mqtt-cpp.mk
[*] package/physfs/physfs.mk
[*] package/pistache/pistache.mk
[*] package/poppler/poppler.mk
[*] package/protozero/protozero.mk
[*] package/pugixml/pugixml.mk
[*] package/python-pybind/python-pybind.mk
[*] package/qhull/qhull.mk
[*] package/qjson/qjson.mk
[*] package/qpid-proton/qpid-proton.mk
[*] package/rabbitmq-c/rabbitmq-c.mk
[*] package/rapidjson/rapidjson.mk
[*] package/re2/re2.mk
[*] package/read-edid/read-edid.mk
[*] package/rtl_433/rtl_433.mk
[*] package/rtty/rtty.mk
[*] package/sentry-native/sentry-native.mk
[*] package/simple-mail/simple-mail.mk
[*] package/snappy/snappy.mk
[*] package/snort3/snort3.mk
[*] package/solarus/solarus.mk
[*] package/spdlog/spdlog.mk
[*] package/sysrepo/sysrepo.mk
[*] package/taglib/taglib.mk
[*] package/taskd/taskd.mk
[*] package/tcf-agent/tcf-agent.mk
[*] package/thrift/thrift.mk
[*] package/tinyxml2/tinyxml2.mk
[*] package/ttyd/ttyd.mk
[*] package/ubus/ubus.mk
[*] package/uhd/uhd.mk
[*] package/uhttpd/uhttpd.mk
[*] package/unionfs/unionfs.mk
[*] package/unzip/unzip.mk
[*] package/uqmi/uqmi.mk
[*] package/ustream-ssl/ustream-ssl.mk
[*] package/utf8proc/utf8proc.mk
[*] package/uvw/uvw.mk
[*] package/valijson/valijson.mk
[*] package/vulkan-headers/vulkan-headers.mk
[*] package/waffle/waffle.mk
[*] package/wampcc/wampcc.mk
[*] package/waylandpp/waylandpp.mk
[*] package/webkitgtk/webkitgtk.mk
[*] package/websocketpp/websocketpp.mk
[*] package/woff2/woff2.mk
[*] package/wpewebkit/wpewebkit.mk
[*] package/x265/x265.mk
[*] package/xerces/xerces.mk
[*] package/yajl/yajl.mk
[*] package/yaml-cpp/yaml-cpp.mk
[*] package/ympd/ympd.mk
[*] package/zlib-ng/zlib-ng.mk
[*] package/znc/znc.mk
[*] package/zxing-cpp/zxing-cpp.mk
[*] package/zziplib/zziplib.mk
[*] package/libsoxr/libsoxr.mk
[*] package/libspatialindex/libspatialindex.mk
[*] package/lugaru/lugaru.mk
[*] package/minetest/minetest.mk
[*] package/openfpgaloader/openfpgaloader.mk
[*] package/supertux/supertux.mk
[*] package/supertuxkart/supertuxkart.mk
[=] package/libcorrect/libcorrect.mk
[=] package/ninja/ninja.mk
[?] package/racehound/racehound.mk
[?] package/azmq/azmq.mk
[?] package/bullet/bullet.mk
[?] package/cppcms/cppcms.mk
[?] package/netopeer2/netopeer2.mk
[?] package/piglit/piglit.mk
[?] package/pulseview/pulseview.mk
[?] package/qt5/qt5webkit/qt5webkit.mk
[?] package/quazip/quazip.mk
[?] package/sysdig/sysdig.mk
[?] package/wireshark/wireshark.mk
[ ] package/assimp/assimp.mk
[ ] package/chipmunk/chipmunk.mk
[ ] package/domoticz/domoticz.mk
[ ] package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.mk [ ] package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.mk [ ] package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.mk [ ] package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.mk [ ] package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.mk [ ] package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.mk [ ] package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.mk [ ] package/kodi-audioencoder-flac/kodi-audioencoder-flac.mk
[ ] package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk
[ ] package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.mk [ ] package/kodi-audioencoder-wav/kodi-audioencoder-wav.mk
[ ] package/kodi-inputstream-adaptive/kodi-inputstream-adaptive.mk [ ] package/kodi-inputstream-ffmpegdirect/kodi-inputstream-ffmpegdirect.mk [ ] package/kodi-inputstream-rtmp/kodi-inputstream-rtmp.mk
[ ] package/kodi-jsonschemabuilder/kodi-jsonschemabuilder.mk
[ ] package/kodi-peripheral-joystick/kodi-peripheral-joystick.mk [ ] package/kodi-peripheral-xarcade/kodi-peripheral-xarcade.mk [ ] package/kodi-pvr-argustv/kodi-pvr-argustv.mk
[ ] package/kodi-pvr-dvblink/kodi-pvr-dvblink.mk
[ ] package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.mk
[ ] package/kodi-pvr-filmon/kodi-pvr-filmon.mk
[ ] package/kodi-pvr-hdhomerun/kodi-pvr-hdhomerun.mk
[ ] package/kodi-pvr-hts/kodi-pvr-hts.mk
[ ] package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.mk
[ ] package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.mk [ ] package/kodi-pvr-mythtv/kodi-pvr-mythtv.mk
[ ] package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.mk
[ ] package/kodi-pvr-njoy/kodi-pvr-njoy.mk
[ ] package/kodi-pvr-octonet/kodi-pvr-octonet.mk
[ ] package/kodi-pvr-pctv/kodi-pvr-pctv.mk
[ ] package/kodi-pvr-plutotv/kodi-pvr-plutotv.mk
[ ] package/kodi-pvr-stalker/kodi-pvr-stalker.mk
[ ] package/kodi-pvr-vbox/kodi-pvr-vbox.mk
[ ] package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.mk
[ ] package/kodi-pvr-vuplus/kodi-pvr-vuplus.mk
[ ] package/kodi-pvr-waipu/kodi-pvr-waipu.mk
[ ] package/kodi-pvr-wmc/kodi-pvr-wmc.mk
[ ] package/kodi-pvr-zattoo/kodi-pvr-zattoo.mk
[ ] package/kodi-screensaver-asteroids/kodi-screensaver-asteroids.mk [ ] package/kodi-screensaver-asterwave/kodi-screensaver-asterwave.mk [ ] package/kodi-screensaver-biogenesis/kodi-screensaver-biogenesis.mk [ ] package/kodi-screensaver-cpblobs/kodi-screensaver-cpblobs.mk [ ] package/kodi-screensaver-greynetic/kodi-screensaver-greynetic.mk [ ] package/kodi-screensaver-matrixtrails/kodi-screensaver-matrixtrails.mk [ ] package/kodi-screensaver-pingpong/kodi-screensaver-pingpong.mk [ ] package/kodi-screensaver-pyro/kodi-screensaver-pyro.mk
[ ] package/kodi-screensaver-rsxs/kodi-screensaver-rsxs.mk
[ ] package/kodi-screensaver-stars/kodi-screensaver-stars.mk
[ ] package/kodi-texturepacker/kodi-texturepacker.mk
[ ] package/kodi-vfs-libarchive/kodi-vfs-libarchive.mk
[ ] package/kodi-vfs-rar/kodi-vfs-rar.mk
[ ] package/kodi-vfs-sftp/kodi-vfs-sftp.mk
[ ] package/kodi-visualisation-fishbmc/kodi-visualisation-fishbmc.mk [ ] package/kodi-visualisation-goom/kodi-visualisation-goom.mk [ ] package/kodi-visualisation-matrix/kodi-visualisation-matrix.mk [ ] package/kodi-visualisation-shadertoy/kodi-visualisation-shadertoy.mk [ ] package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.mk [ ] package/kodi-visualisation-starburst/kodi-visualisation-starburst.mk [ ] package/kodi-visualisation-waveform/kodi-visualisation-waveform.mk [ ] package/kodi/kodi.mk
[ ] package/libcpprestsdk/libcpprestsdk.mk
[ ] package/libfreeglut/libfreeglut.mk
[ ] package/libglfw/libglfw.mk
[ ] package/libressl/libressl.mk
[ ] package/libubootenv/libubootenv.mk
[ ] package/libuwsc/libuwsc.mk
[ ] package/libyang/libyang.mk
[ ] package/mfgtools/mfgtools.mk
[ ] package/minizip/minizip.mk
[ ] package/ne10/ne10.mk
[ ] package/ogre/ogre.mk
[ ] package/open62541/open62541.mk
[ ] package/opencv3/opencv3.mk
[ ] package/opentracing-cpp/opentracing-cpp.mk
[ ] package/optee-benchmark/optee-benchmark.mk
[ ] package/optee-client/optee-client.mk
[ ] package/optee-examples/optee-examples.mk
[ ] package/optee-test/optee-test.mk
[ ] package/osm2pgsql/osm2pgsql.mk
[ ] package/rpi-userland/rpi-userland.mk
[ ] package/sdbus-cpp/sdbus-cpp.mk
[ ] package/stellarium/stellarium.mk
[ ] package/synergy/synergy.mk
[ ] package/timescaledb/timescaledb.mk
[ ] package/xmrig/xmrig.mk

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#13 lore raw

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

In reply to Adrian Perez de Castro

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.

---
 package/pkg-cmake.mk | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
package/pkg-cmake.mk +14 -10
index 3b1db35fb6..65f005a914 100644
@@ -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
-
 $(3)_SUPPORTS_IN_SOURCE_BUILD ?= YES
 
 
@@ -88,6 +83,7 @@ define $(2)_CONFIGURE_CMDS
 	rm -f CMakeCache.txt && \
 	PATH=$$(BR_PATH) \
 	$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
+		-GNinja \
 		-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/share/buildroot/toolchainfile.cmake" \
 		-DCMAKE_INSTALL_PREFIX="/usr" \
 		-DCMAKE_COLOR_MAKEFILE=OFF \
@@ -117,6 +113,7 @@ define $(2)_CONFIGURE_CMDS
 	PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
 	PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
 	$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
+		-GNinja \
 		-DCMAKE_INSTALL_SO_NO_EXE=0 \
 		-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
 		-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \
@@ -154,6 +151,8 @@ endif
 # primitives to find {C,LD}FLAGS, add it to the dependency list.
 $(2)_DEPENDENCIES += host-pkgconf
 
+$(2)_DEPENDENCIES += host-ninja
+
 $(2)_DEPENDENCIES += $(BR2_CMAKE_HOST_DEPENDENCY)
 
 #
@@ -163,11 +162,13 @@ $(2)_DEPENDENCIES += $(BR2_CMAKE_HOST_DEPENDENCY)
 ifndef $(2)_BUILD_CMDS
 ifeq ($(4),target)
 define $(2)_BUILD_CMDS
-	$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
+		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_BUILDDIR)
 endef
 else
 define $(2)_BUILD_CMDS
-	$$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
+		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_BUILDDIR)
 endef
 endif
 endif
@@ -178,7 +179,8 @@ endif
 #
 ifndef $(2)_INSTALL_CMDS
 define $(2)_INSTALL_CMDS
-	$$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_BUILDDIR) install
 endef
 endif
 
@@ -188,7 +190,8 @@ endif
 #
 ifndef $(2)_INSTALL_STAGING_CMDS
 define $(2)_INSTALL_STAGING_CMDS
-	$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_STAGING_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(STAGING_DIR) \
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_BUILDDIR) install
 endef
 endif
 
@@ -198,7 +201,8 @@ endif
 #
 ifndef $(2)_INSTALL_TARGET_CMDS
 define $(2)_INSTALL_TARGET_CMDS
-	$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_TARGET_OPTS) -C $$($$(PKG)_BUILDDIR)
+	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(TARGET_DIR) \
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_BUILDDIR) install
 endef
 endif
 
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#14 lore raw

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

Hello,

Quoted 14 lines · On Wed, 12 Jan 2022 15:26:18 +0200 Adrian Perez de Castro <[email protected]>…

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.

---
 package/pkg-cmake.mk | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
package/pkg-cmake.mk +0 -0
index 3b1db35fb6..65f005a914 100644

package/pkg-cmake.mk endif · line 57

Quoted 7 lines
package/pkg-cmake.mk +0 -4
@@ -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 could spot:

MUSEPACK_MAKE = $(MAKE1)

But also:

HOST_MARIADB_MAKE_OPTS = import_executables

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#15 lore raw

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

Hi,

Quoted 20 lines · On Wed, 12 Jan 2022 15:35:16 +0100 Thomas Petazzoni…
Quoted 17 lines · On Wed, 12 Jan 2022 15:26:18 +0200 Adrian Perez de Castro <[email protected]>…

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.

---
 package/pkg-cmake.mk | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
package/pkg-cmake.mk +0 -0
index 3b1db35fb6..65f005a914 100644
@@ -51,11 +51,6 @@ endif
 
 define inner-cmake-package
 
Quoted 7 lines

package/pkg-cmake.mk endif · line 57

Quoted 4 lines
package/pkg-cmake.mk +0 -4
-$(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.

Quoted 3 lines

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.

Quoted 3 lines

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

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#16 lore raw
In reply to Adrian Perez de Castro

Hello Adrian,

Quoted 7 lines · On Wed, 12 Jan 2022 15:26:16 +0200 Adrian Perez de Castro <[email protected]>…

While not a long list by any means, I think it shows a decent sample of packages coming from different development teams that work just fine switching to Ninja.

If anybody can suggest something with a bigger number of CMake packages to build (or a .config file to share) I will be more than happy to give it a test this with these patches applied :)

Packages that need to be tested:

./package/alure/alure.mk
./package/apitrace/apitrace.mk ./package/armadillo/armadillo.mk
./package/assimp/assimp.mk
./package/avro-c/avro-c.mk
./package/azmq/azmq.mk ./package/azure-iot-sdk-c/azure-iot-sdk-c.mk ./package/bcg729/bcg729.mk
./package/bctoolbox/bctoolbox.mk ./package/belle-sip/belle-sip.mk
./package/belr/belr.mk
./package/bento4/bento4.mk
./package/brickd/brickd.mk
./package/brotli/brotli.mk
./package/bullet/bullet.mk ./package/cannelloni/cannelloni.mk
./package/cctz/cctz.mk
./package/cdrkit/cdrkit.mk
./package/cegui/cegui.mk
./package/cereal/cereal.mk
./package/cfm/cfm.mk
./package/chipmunk/chipmunk.mk
./package/cjson/cjson.mk
./package/clang/clang.mk
./package/cmake/cmake.mk
./package/cmocka/cmocka.mk
./package/cog/cog.mk
./package/c-periphery/c-periphery.mk ./package/cppcms/cppcms.mk
./package/cppdb/cppdb.mk
./package/cppzmq/cppzmq.mk
./package/curlpp/curlpp.mk
./package/cutelyst/cutelyst.mk ./package/domoticz/domoticz.mk
./package/doxygen/doxygen.mk
./package/easydbus/easydbus.mk ./package/easyframes/easyframes.mk
./package/eigen/eigen.mk
./package/exiv2/exiv2.mk
./package/fatcat/fatcat.mk ./package/firmware-utils/firmware-utils.mk ./package/flann/flann.mk ./package/flare-engine/flare-engine.mk ./package/flare-game/flare-game.mk ./package/flatbuffers/flatbuffers.mk ./package/flatcc/flatcc.mk ./package/fluidsynth/fluidsynth.mk
./package/fmt/fmt.mk
./package/freerdp/freerdp.mk
./package/gerbera/gerbera.mk
./package/gflags/gflags.mk
./package/gli/gli.mk
./package/glm/glm.mk
./package/glog/glog.mk
./package/gnuradio/gnuradio.mk
./package/gqrx/gqrx.mk
./package/grantlee/grantlee.mk ./package/graphite2/graphite2.mk ./package/gr-osmosdr/gr-osmosdr.mk
./package/grpc/grpc.mk
./package/gtest/gtest.mk
./package/hackrf/hackrf.mk
./package/hiawatha/hiawatha.mk
./package/hiredis/hiredis.mk
./package/i2pd/i2pd.mk ./package/intel-gmmlib/intel-gmmlib.mk ./package/intel-mediadriver/intel-mediadriver.mk ./package/intel-mediasdk/intel-mediasdk.mk ./package/jasper/jasper.mk ./package/jpeg-turbo/jpeg-turbo.mk ./package/json-c/json-c.mk ./package/json-for-modern-cpp/json-for-modern-cpp.mk ./package/kf5/kf5-extra-cmake-modules/kf5-extra-cmake-modules.mk ./package/kf5/kf5-kcoreaddons/kf5-kcoreaddons.mk ./package/kf5/kf5-modemmanager-qt/kf5-modemmanager-qt.mk ./package/kf5/kf5-networkmanager-qt/kf5-networkmanager-qt.mk ./package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.mk ./package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.mk ./package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.mk ./package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.mk ./package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.mk ./package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.mk ./package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.mk ./package/kodi-audioencoder-flac/kodi-audioencoder-flac.mk ./package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk ./package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.mk ./package/kodi-audioencoder-wav/kodi-audioencoder-wav.mk ./package/kodi-inputstream-adaptive/kodi-inputstream-adaptive.mk ./package/kodi-inputstream-ffmpegdirect/kodi-inputstream-ffmpegdirect.mk ./package/kodi-inputstream-rtmp/kodi-inputstream-rtmp.mk ./package/kodi-jsonschemabuilder/kodi-jsonschemabuilder.mk ./package/kodi/kodi.mk ./package/kodi-peripheral-joystick/kodi-peripheral-joystick.mk ./package/kodi-peripheral-xarcade/kodi-peripheral-xarcade.mk ./package/kodi-pvr-argustv/kodi-pvr-argustv.mk ./package/kodi-pvr-dvblink/kodi-pvr-dvblink.mk ./package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.mk ./package/kodi-pvr-filmon/kodi-pvr-filmon.mk ./package/kodi-pvr-hdhomerun/kodi-pvr-hdhomerun.mk ./package/kodi-pvr-hts/kodi-pvr-hts.mk ./package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.mk ./package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.mk ./package/kodi-pvr-mythtv/kodi-pvr-mythtv.mk ./package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.mk ./package/kodi-pvr-njoy/kodi-pvr-njoy.mk ./package/kodi-pvr-octonet/kodi-pvr-octonet.mk ./package/kodi-pvr-pctv/kodi-pvr-pctv.mk ./package/kodi-pvr-plutotv/kodi-pvr-plutotv.mk ./package/kodi-pvr-stalker/kodi-pvr-stalker.mk ./package/kodi-pvr-vbox/kodi-pvr-vbox.mk ./package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.mk ./package/kodi-pvr-vuplus/kodi-pvr-vuplus.mk ./package/kodi-pvr-waipu/kodi-pvr-waipu.mk ./package/kodi-pvr-wmc/kodi-pvr-wmc.mk ./package/kodi-pvr-zattoo/kodi-pvr-zattoo.mk ./package/kodi-screensaver-asteroids/kodi-screensaver-asteroids.mk ./package/kodi-screensaver-asterwave/kodi-screensaver-asterwave.mk ./package/kodi-screensaver-biogenesis/kodi-screensaver-biogenesis.mk ./package/kodi-screensaver-cpblobs/kodi-screensaver-cpblobs.mk ./package/kodi-screensaver-greynetic/kodi-screensaver-greynetic.mk ./package/kodi-screensaver-matrixtrails/kodi-screensaver-matrixtrails.mk ./package/kodi-screensaver-pingpong/kodi-screensaver-pingpong.mk ./package/kodi-screensaver-pyro/kodi-screensaver-pyro.mk ./package/kodi-screensaver-rsxs/kodi-screensaver-rsxs.mk ./package/kodi-screensaver-stars/kodi-screensaver-stars.mk ./package/kodi-texturepacker/kodi-texturepacker.mk ./package/kodi-vfs-libarchive/kodi-vfs-libarchive.mk ./package/kodi-vfs-rar/kodi-vfs-rar.mk ./package/kodi-vfs-sftp/kodi-vfs-sftp.mk ./package/kodi-visualisation-fishbmc/kodi-visualisation-fishbmc.mk ./package/kodi-visualisation-goom/kodi-visualisation-goom.mk ./package/kodi-visualisation-matrix/kodi-visualisation-matrix.mk ./package/kodi-visualisation-shadertoy/kodi-visualisation-shadertoy.mk ./package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.mk ./package/kodi-visualisation-starburst/kodi-visualisation-starburst.mk ./package/kodi-visualisation-waveform/kodi-visualisation-waveform.mk ./package/lapack/lapack.mk
./package/lensfun/lensfun.mk ./package/let-me-create/let-me-create.mk ./package/leveldb/leveldb.mk ./package/libabseil-cpp/libabseil-cpp.mk ./package/libasplib/libasplib.mk
./package/libcec/libcec.mk
./package/libcgi/libcgi.mk
./package/libcodec2/libcodec2.mk ./package/libcorrect/libcorrect.mk ./package/libcpprestsdk/libcpprestsdk.mk ./package/libcuefile/libcuefile.mk ./package/libcue/libcue.mk
./package/libeastl/libeastl.mk
./package/libebml/libebml.mk ./package/libebur128/libebur128.mk ./package/libfreeglut/libfreeglut.mk ./package/libftdi1/libftdi1.mk
./package/libgeos/libgeos.mk
./package/libgit2/libgit2.mk
./package/libglfw/libglfw.mk
./package/libgta/libgta.mk
./package/libical/libical.mk ./package/libiec61850/libiec61850.mk ./package/libiio/libiio.mk
./package/libiqrf/libiqrf.mk
./package/libks/libks.mk ./package/libmatroska/libmatroska.mk ./package/libmdbx/libmdbx.mk ./package/libminiupnpc/libminiupnpc.mk ./package/libnetconf2/libnetconf2.mk ./package/libolm/libolm.mk
./package/libosmium/libosmium.mk ./package/libplatform/libplatform.mk ./package/libressl/libressl.mk ./package/librsync/librsync.mk ./package/librtlsdr/librtlsdr.mk ./package/libsoxr/libsoxr.mk ./package/libspatialindex/libspatialindex.mk ./package/libssh/libssh.mk ./package/libubootenv/libubootenv.mk ./package/libubox/libubox.mk
./package/libuci/libuci.mk
./package/libuecc/libuecc.mk ./package/libuhttpd/libuhttpd.mk ./package/liburiparser/liburiparser.mk ./package/libuwsc/libuwsc.mk ./package/libvncserver/libvncserver.mk ./package/libwebsockets/libwebsockets.mk ./package/libyang/libyang.mk
./package/libyuv/libyuv.mk
./package/libzip/libzip.mk
./package/linphone/linphone.mk ./package/linux-serial-test/linux-serial-test.mk ./package/lld/lld.mk
./package/llvm/llvm.mk
./package/log4cxx/log4cxx.mk
./package/log4qt/log4qt.mk
./package/lua-ev/lua-ev.mk
./package/lua-sdl2/lua-sdl2.mk
./package/lugaru/lugaru.mk
./package/luvi/luvi.mk
./package/luv/luv.mk
./package/lzlib/lzlib.mk
./package/lzo/lzo.mk
./package/mariadb/mariadb.mk
./package/mbedtls/mbedtls.mk ./package/mediastreamer/mediastreamer.mk ./package/mfgtools/mfgtools.mk
./package/midori/midori.mk
./package/minetest/minetest.mk
./package/minizip/minizip.mk ./package/mjpg-streamer/mjpg-streamer.mk ./package/mraa/mraa.mk
./package/mrp/mrp.mk
./package/msgpack/msgpack.mk
./package/musepack/musepack.mk
./package/nanomsg/nanomsg.mk
./package/ne10/ne10.mk
./package/netopeer2/netopeer2.mk
./package/ninja/ninja.mk
./package/odhcp6c/odhcp6c.mk
./package/ogre/ogre.mk
./package/open62541/open62541.mk
./package/openal/openal.mk
./package/opencv3/opencv3.mk
./package/opencv4/opencv4.mk ./package/openfpgaloader/openfpgaloader.mk ./package/openjpeg/openjpeg.mk ./package/openobex/openobex.mk ./package/openpowerlink/openpowerlink.mk ./package/opentracing-cpp/opentracing-cpp.mk ./package/optee-benchmark/optee-benchmark.mk ./package/optee-client/optee-client.mk ./package/optee-examples/optee-examples.mk ./package/optee-test/optee-test.mk
./package/ortp/ortp.mk
./package/osm2pgsql/osm2pgsql.mk ./package/paho-mqtt-c/paho-mqtt-c.mk ./package/paho-mqtt-cpp/paho-mqtt-cpp.mk ./package/physfs/physfs.mk
./package/piglit/piglit.mk
./package/pistache/pistache.mk
./package/pkg-cmake.mk
./package/poppler/poppler.mk ./package/protozero/protozero.mk ./package/pugixml/pugixml.mk ./package/pulseview/pulseview.mk ./package/python-pybind/python-pybind.mk ./package/qhull/qhull.mk
./package/qjson/qjson.mk ./package/qpid-proton/qpid-proton.mk ./package/qt5/qt5webkit/qt5webkit.mk ./package/quazip/quazip.mk ./package/rabbitmq-c/rabbitmq-c.mk ./package/racehound/racehound.mk ./package/rapidjson/rapidjson.mk
./package/re2/re2.mk
./package/read-edid/read-edid.mk ./package/rpi-userland/rpi-userland.mk ./package/rtl_433/rtl_433.mk
./package/rtty/rtty.mk
./package/sdbus-cpp/sdbus-cpp.mk ./package/sentry-native/sentry-native.mk ./package/simple-mail/simple-mail.mk ./package/snappy/snappy.mk
./package/snort3/snort3.mk
./package/solarus/solarus.mk
./package/spdlog/spdlog.mk ./package/stellarium/stellarium.mk ./package/supertuxkart/supertuxkart.mk ./package/supertux/supertux.mk
./package/synergy/synergy.mk
./package/sysdig/sysdig.mk
./package/sysrepo/sysrepo.mk
./package/taglib/taglib.mk
./package/taskd/taskd.mk
./package/tcf-agent/tcf-agent.mk
./package/thrift/thrift.mk ./package/timescaledb/timescaledb.mk ./package/tinyxml2/tinyxml2.mk
./package/ttyd/ttyd.mk
./package/ubus/ubus.mk
./package/uhd/uhd.mk
./package/uhttpd/uhttpd.mk
./package/unionfs/unionfs.mk
./package/unzip/unzip.mk
./package/uqmi/uqmi.mk
./package/ustream-ssl/ustream-ssl.mk ./package/utf8proc/utf8proc.mk
./package/uvw/uvw.mk
./package/valijson/valijson.mk ./package/vulkan-headers/vulkan-headers.mk ./package/waffle/waffle.mk
./package/wampcc/wampcc.mk
./package/waylandpp/waylandpp.mk ./package/webkitgtk/webkitgtk.mk ./package/websocketpp/websocketpp.mk ./package/wireshark/wireshark.mk
./package/woff2/woff2.mk
./package/wpewebkit/wpewebkit.mk
./package/x265/x265.mk
./package/xerces/xerces.mk
./package/xmrig/xmrig.mk
./package/yajl/yajl.mk
./package/yaml-cpp/yaml-cpp.mk
./package/ympd/ympd.mk
./package/zlib-ng/zlib-ng.mk
./package/znc/znc.mk
./package/zxing-cpp/zxing-cpp.mk ./package/zziplib/zziplib.mk

The list is much longer than the ~10 samples you have taken I'm afraid :-)

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#17 lore raw

Hi Thomas, all,

Quoted 312 lines · On Wed, 12 Jan 2022 15:36:34 +0100 Thomas Petazzoni…
Quoted 7 lines · On Wed, 12 Jan 2022 15:26:16 +0200 Adrian Perez de Castro <[email protected]>…

While not a long list by any means, I think it shows a decent sample of packages coming from different development teams that work just fine switching to Ninja.

If anybody can suggest something with a bigger number of CMake packages to build (or a .config file to share) I will be more than happy to give it a test this with these patches applied :)

Packages that need to be tested:

./package/alure/alure.mk
./package/apitrace/apitrace.mk ./package/armadillo/armadillo.mk
./package/assimp/assimp.mk
./package/avro-c/avro-c.mk
./package/azmq/azmq.mk ./package/azure-iot-sdk-c/azure-iot-sdk-c.mk ./package/bcg729/bcg729.mk
./package/bctoolbox/bctoolbox.mk ./package/belle-sip/belle-sip.mk
./package/belr/belr.mk
./package/bento4/bento4.mk
./package/brickd/brickd.mk
./package/brotli/brotli.mk
./package/bullet/bullet.mk ./package/cannelloni/cannelloni.mk
./package/cctz/cctz.mk
./package/cdrkit/cdrkit.mk
./package/cegui/cegui.mk
./package/cereal/cereal.mk
./package/cfm/cfm.mk
./package/chipmunk/chipmunk.mk
./package/cjson/cjson.mk
./package/clang/clang.mk
./package/cmake/cmake.mk
./package/cmocka/cmocka.mk
./package/cog/cog.mk
./package/c-periphery/c-periphery.mk ./package/cppcms/cppcms.mk
./package/cppdb/cppdb.mk
./package/cppzmq/cppzmq.mk
./package/curlpp/curlpp.mk
./package/cutelyst/cutelyst.mk ./package/domoticz/domoticz.mk
./package/doxygen/doxygen.mk
./package/easydbus/easydbus.mk ./package/easyframes/easyframes.mk
./package/eigen/eigen.mk
./package/exiv2/exiv2.mk
./package/fatcat/fatcat.mk ./package/firmware-utils/firmware-utils.mk ./package/flann/flann.mk ./package/flare-engine/flare-engine.mk ./package/flare-game/flare-game.mk ./package/flatbuffers/flatbuffers.mk ./package/flatcc/flatcc.mk ./package/fluidsynth/fluidsynth.mk
./package/fmt/fmt.mk
./package/freerdp/freerdp.mk
./package/gerbera/gerbera.mk
./package/gflags/gflags.mk
./package/gli/gli.mk
./package/glm/glm.mk
./package/glog/glog.mk
./package/gnuradio/gnuradio.mk
./package/gqrx/gqrx.mk
./package/grantlee/grantlee.mk ./package/graphite2/graphite2.mk ./package/gr-osmosdr/gr-osmosdr.mk
./package/grpc/grpc.mk
./package/gtest/gtest.mk
./package/hackrf/hackrf.mk
./package/hiawatha/hiawatha.mk
./package/hiredis/hiredis.mk
./package/i2pd/i2pd.mk ./package/intel-gmmlib/intel-gmmlib.mk ./package/intel-mediadriver/intel-mediadriver.mk ./package/intel-mediasdk/intel-mediasdk.mk ./package/jasper/jasper.mk ./package/jpeg-turbo/jpeg-turbo.mk ./package/json-c/json-c.mk ./package/json-for-modern-cpp/json-for-modern-cpp.mk ./package/kf5/kf5-extra-cmake-modules/kf5-extra-cmake-modules.mk ./package/kf5/kf5-kcoreaddons/kf5-kcoreaddons.mk ./package/kf5/kf5-modemmanager-qt/kf5-modemmanager-qt.mk ./package/kf5/kf5-networkmanager-qt/kf5-networkmanager-qt.mk ./package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.mk ./package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.mk ./package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.mk ./package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.mk ./package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.mk ./package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.mk ./package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.mk ./package/kodi-audioencoder-flac/kodi-audioencoder-flac.mk ./package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk ./package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.mk ./package/kodi-audioencoder-wav/kodi-audioencoder-wav.mk ./package/kodi-inputstream-adaptive/kodi-inputstream-adaptive.mk ./package/kodi-inputstream-ffmpegdirect/kodi-inputstream-ffmpegdirect.mk ./package/kodi-inputstream-rtmp/kodi-inputstream-rtmp.mk ./package/kodi-jsonschemabuilder/kodi-jsonschemabuilder.mk ./package/kodi/kodi.mk ./package/kodi-peripheral-joystick/kodi-peripheral-joystick.mk ./package/kodi-peripheral-xarcade/kodi-peripheral-xarcade.mk ./package/kodi-pvr-argustv/kodi-pvr-argustv.mk ./package/kodi-pvr-dvblink/kodi-pvr-dvblink.mk ./package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.mk ./package/kodi-pvr-filmon/kodi-pvr-filmon.mk ./package/kodi-pvr-hdhomerun/kodi-pvr-hdhomerun.mk ./package/kodi-pvr-hts/kodi-pvr-hts.mk ./package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.mk ./package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.mk ./package/kodi-pvr-mythtv/kodi-pvr-mythtv.mk ./package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.mk ./package/kodi-pvr-njoy/kodi-pvr-njoy.mk ./package/kodi-pvr-octonet/kodi-pvr-octonet.mk ./package/kodi-pvr-pctv/kodi-pvr-pctv.mk ./package/kodi-pvr-plutotv/kodi-pvr-plutotv.mk ./package/kodi-pvr-stalker/kodi-pvr-stalker.mk ./package/kodi-pvr-vbox/kodi-pvr-vbox.mk ./package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.mk ./package/kodi-pvr-vuplus/kodi-pvr-vuplus.mk ./package/kodi-pvr-waipu/kodi-pvr-waipu.mk ./package/kodi-pvr-wmc/kodi-pvr-wmc.mk ./package/kodi-pvr-zattoo/kodi-pvr-zattoo.mk ./package/kodi-screensaver-asteroids/kodi-screensaver-asteroids.mk ./package/kodi-screensaver-asterwave/kodi-screensaver-asterwave.mk ./package/kodi-screensaver-biogenesis/kodi-screensaver-biogenesis.mk ./package/kodi-screensaver-cpblobs/kodi-screensaver-cpblobs.mk ./package/kodi-screensaver-greynetic/kodi-screensaver-greynetic.mk ./package/kodi-screensaver-matrixtrails/kodi-screensaver-matrixtrails.mk ./package/kodi-screensaver-pingpong/kodi-screensaver-pingpong.mk ./package/kodi-screensaver-pyro/kodi-screensaver-pyro.mk ./package/kodi-screensaver-rsxs/kodi-screensaver-rsxs.mk ./package/kodi-screensaver-stars/kodi-screensaver-stars.mk ./package/kodi-texturepacker/kodi-texturepacker.mk ./package/kodi-vfs-libarchive/kodi-vfs-libarchive.mk ./package/kodi-vfs-rar/kodi-vfs-rar.mk ./package/kodi-vfs-sftp/kodi-vfs-sftp.mk ./package/kodi-visualisation-fishbmc/kodi-visualisation-fishbmc.mk ./package/kodi-visualisation-goom/kodi-visualisation-goom.mk ./package/kodi-visualisation-matrix/kodi-visualisation-matrix.mk ./package/kodi-visualisation-shadertoy/kodi-visualisation-shadertoy.mk ./package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.mk ./package/kodi-visualisation-starburst/kodi-visualisation-starburst.mk ./package/kodi-visualisation-waveform/kodi-visualisation-waveform.mk ./package/lapack/lapack.mk
./package/lensfun/lensfun.mk ./package/let-me-create/let-me-create.mk ./package/leveldb/leveldb.mk ./package/libabseil-cpp/libabseil-cpp.mk ./package/libasplib/libasplib.mk
./package/libcec/libcec.mk
./package/libcgi/libcgi.mk
./package/libcodec2/libcodec2.mk ./package/libcorrect/libcorrect.mk ./package/libcpprestsdk/libcpprestsdk.mk ./package/libcuefile/libcuefile.mk ./package/libcue/libcue.mk
./package/libeastl/libeastl.mk
./package/libebml/libebml.mk ./package/libebur128/libebur128.mk ./package/libfreeglut/libfreeglut.mk ./package/libftdi1/libftdi1.mk
./package/libgeos/libgeos.mk
./package/libgit2/libgit2.mk
./package/libglfw/libglfw.mk
./package/libgta/libgta.mk
./package/libical/libical.mk ./package/libiec61850/libiec61850.mk ./package/libiio/libiio.mk
./package/libiqrf/libiqrf.mk
./package/libks/libks.mk ./package/libmatroska/libmatroska.mk ./package/libmdbx/libmdbx.mk ./package/libminiupnpc/libminiupnpc.mk ./package/libnetconf2/libnetconf2.mk ./package/libolm/libolm.mk
./package/libosmium/libosmium.mk ./package/libplatform/libplatform.mk ./package/libressl/libressl.mk ./package/librsync/librsync.mk ./package/librtlsdr/librtlsdr.mk ./package/libsoxr/libsoxr.mk ./package/libspatialindex/libspatialindex.mk ./package/libssh/libssh.mk ./package/libubootenv/libubootenv.mk ./package/libubox/libubox.mk
./package/libuci/libuci.mk
./package/libuecc/libuecc.mk ./package/libuhttpd/libuhttpd.mk ./package/liburiparser/liburiparser.mk ./package/libuwsc/libuwsc.mk ./package/libvncserver/libvncserver.mk ./package/libwebsockets/libwebsockets.mk ./package/libyang/libyang.mk
./package/libyuv/libyuv.mk
./package/libzip/libzip.mk
./package/linphone/linphone.mk ./package/linux-serial-test/linux-serial-test.mk ./package/lld/lld.mk
./package/llvm/llvm.mk
./package/log4cxx/log4cxx.mk
./package/log4qt/log4qt.mk
./package/lua-ev/lua-ev.mk
./package/lua-sdl2/lua-sdl2.mk
./package/lugaru/lugaru.mk
./package/luvi/luvi.mk
./package/luv/luv.mk
./package/lzlib/lzlib.mk
./package/lzo/lzo.mk
./package/mariadb/mariadb.mk
./package/mbedtls/mbedtls.mk ./package/mediastreamer/mediastreamer.mk ./package/mfgtools/mfgtools.mk
./package/midori/midori.mk
./package/minetest/minetest.mk
./package/minizip/minizip.mk ./package/mjpg-streamer/mjpg-streamer.mk ./package/mraa/mraa.mk
./package/mrp/mrp.mk
./package/msgpack/msgpack.mk
./package/musepack/musepack.mk
./package/nanomsg/nanomsg.mk
./package/ne10/ne10.mk
./package/netopeer2/netopeer2.mk
./package/ninja/ninja.mk
./package/odhcp6c/odhcp6c.mk
./package/ogre/ogre.mk
./package/open62541/open62541.mk
./package/openal/openal.mk
./package/opencv3/opencv3.mk
./package/opencv4/opencv4.mk ./package/openfpgaloader/openfpgaloader.mk ./package/openjpeg/openjpeg.mk ./package/openobex/openobex.mk ./package/openpowerlink/openpowerlink.mk ./package/opentracing-cpp/opentracing-cpp.mk ./package/optee-benchmark/optee-benchmark.mk ./package/optee-client/optee-client.mk ./package/optee-examples/optee-examples.mk ./package/optee-test/optee-test.mk
./package/ortp/ortp.mk
./package/osm2pgsql/osm2pgsql.mk ./package/paho-mqtt-c/paho-mqtt-c.mk ./package/paho-mqtt-cpp/paho-mqtt-cpp.mk ./package/physfs/physfs.mk
./package/piglit/piglit.mk
./package/pistache/pistache.mk
./package/pkg-cmake.mk
./package/poppler/poppler.mk ./package/protozero/protozero.mk ./package/pugixml/pugixml.mk ./package/pulseview/pulseview.mk ./package/python-pybind/python-pybind.mk ./package/qhull/qhull.mk
./package/qjson/qjson.mk ./package/qpid-proton/qpid-proton.mk ./package/qt5/qt5webkit/qt5webkit.mk ./package/quazip/quazip.mk ./package/rabbitmq-c/rabbitmq-c.mk ./package/racehound/racehound.mk ./package/rapidjson/rapidjson.mk
./package/re2/re2.mk
./package/read-edid/read-edid.mk ./package/rpi-userland/rpi-userland.mk ./package/rtl_433/rtl_433.mk
./package/rtty/rtty.mk
./package/sdbus-cpp/sdbus-cpp.mk ./package/sentry-native/sentry-native.mk ./package/simple-mail/simple-mail.mk ./package/snappy/snappy.mk
./package/snort3/snort3.mk
./package/solarus/solarus.mk
./package/spdlog/spdlog.mk ./package/stellarium/stellarium.mk ./package/supertuxkart/supertuxkart.mk ./package/supertux/supertux.mk
./package/synergy/synergy.mk
./package/sysdig/sysdig.mk
./package/sysrepo/sysrepo.mk
./package/taglib/taglib.mk
./package/taskd/taskd.mk
./package/tcf-agent/tcf-agent.mk
./package/thrift/thrift.mk ./package/timescaledb/timescaledb.mk ./package/tinyxml2/tinyxml2.mk
./package/ttyd/ttyd.mk
./package/ubus/ubus.mk
./package/uhd/uhd.mk
./package/uhttpd/uhttpd.mk
./package/unionfs/unionfs.mk
./package/unzip/unzip.mk
./package/uqmi/uqmi.mk
./package/ustream-ssl/ustream-ssl.mk ./package/utf8proc/utf8proc.mk
./package/uvw/uvw.mk
./package/valijson/valijson.mk ./package/vulkan-headers/vulkan-headers.mk ./package/waffle/waffle.mk
./package/wampcc/wampcc.mk
./package/waylandpp/waylandpp.mk ./package/webkitgtk/webkitgtk.mk ./package/websocketpp/websocketpp.mk ./package/wireshark/wireshark.mk
./package/woff2/woff2.mk
./package/wpewebkit/wpewebkit.mk
./package/x265/x265.mk
./package/xerces/xerces.mk

Quoted 8 lines

./package/xmrig/xmrig.mk
./package/yajl/yajl.mk
./package/yaml-cpp/yaml-cpp.mk
./package/ympd/ympd.mk
./package/zlib-ng/zlib-ng.mk
./package/znc/znc.mk
./package/zxing-cpp/zxing-cpp.mk
./package/zziplib/zziplib.mk

Ah, I guess you grepped the *.mk files for "cmake-package"; that didn't cross my mind but now that it crossed my mind I feel silly for not thinking about it before ^_^

Quoted 1 line

The list is much longer than the ~10 samples you have taken I'm afraid :-)

Of course I knew it would be way longer, but I wanted to show something quick after yesterday's discussion on IRC. I'll keep poking at things to see how it fares for the rest of packages above and publish updated versions of the patch set as I go fixing things.

Cheers,
—Adrián

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#18 lore raw
Quoted 3 lines · On Wed, 12 Jan 2022 17:09:38 +0200 Adrian Perez de Castro <[email protected]>…

Ah, I guess you grepped the *.mk files for "cmake-package"; that didn't cross my mind but now that it crossed my mind I feel silly for not thinking about it before ^_^

Exactly what I did, indeed. Please note that we do not require that absolutely all packages are tested before merging this. The autobuilders will not their amount of work there to validate everything.

But it would be good to have tested a wider configuration with more CMake packages enabled. Make sure to include the defconfig you have tested in the cover letter.

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#19 lore raw
In reply to Adrian Perez de Castro

Hello Adrian,

Quoted 3 lines · Adrian Perez de Castro

As discussed yesterday, here is a quick stab for testing and getting the conversation started about using Ninja for CMake-based packages (hence the missing documentation updates and the "RFC" tag in the subject :-D).

I miss some general motivation for switching from Makefile to Ninja generator. Can you add some reasoning or numbers to upcoming patch set revisions?

Thanks and greets
Alex

Quoted 58 lines

In order to avoid the circular dependency of host-ninja requiring itself, ninja.mk gets changed to use host-generic-package with a build command that plainly runs the compiler on the set of sources we know are needed to build a minimal usable version of it under Unix-y systems. This is basically the list of sources that CMake would have picked (as per the CMakeLists.txt file) passed straight to $(HOSTCXX).

The next change modifies pkg-cmake.mk to always pass -GNinja and removes the $(<PKG>_INSTALL[_STAGING,_TARGET]_OPTS) variables, because when using Ninja the "install/fast" targets are not generated by CMake (those are an internal detail of the Makefile generator, it seems). For consistency with the Meson package infrastructure variables $(NINJA), $(<PKG>_NINJA_ENV) and $(NINJA_OPTS) are honored by the default set of build/install commands.

Now, there might be packages that break with this, and I would be particularly concerned about things like packages which use CMake and build out-of-tree kernel modules (as the kernel build infrastructure is all Make, and only Make!) but the changes included were enough for me to get Raspberry Pi images built with WebKit (both GTK and WPE ports) in it, which results in the following built using [host-]cmake-package:

- brotli
- cog
- jpeg-turbo
- openjpeg
- webkitgtk
- webp
- woff2
- wpewebkit

While not a long list by any means, I think it shows a decent sample of packages coming from different development teams that work just fine switching to Ninja.

If anybody can suggest something with a bigger number of CMake packages to build (or a .config file to share) I will be more than happy to give it a test this with these patches applied :)

Cheers,
-Adrian

Adrian Perez de Castro (2):
package/ninja: do not require cmake
package/pkg-cmake.mk: use ninja instead of make

 package/ninja/ninja.mk | 36 +++++++++++++++++++++++++++++++++++-
 package/pkg-cmake.mk   | 24 ++++++++++++++----------
 2 files changed, 49 insertions(+), 11 deletions(-)
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 4 lines
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#20 lore raw

Hi Alexander,

Quoted 8 lines · On Wed, 12 Jan 2022 17:05:13 +0100 Alexander Dahl <[email protected]> wrote:
Quoted 3 lines · Adrian Perez de Castro

As discussed yesterday, here is a quick stab for testing and getting the conversation started about using Ninja for CMake-based packages (hence the missing documentation updates and the "RFC" tag in the subject :-D).

I miss some general motivation for switching from Makefile to Ninja generator. Can you add some reasoning or numbers to upcoming patch set revisions?

Ninja is generally faster, tends to make better use of parallelism, and in my experience less likely to break in odd ways. Once I have a defconfig with a bigger set of CMake-based packages working I'll do some numbers as well to compare build times before and after the switch to Ninja.

Cheers,
—Adrián

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#21 lore raw
Quoted 9 lines · Adrian Perez de Castro

Hi Alexander,

Quoted 5 lines · On Wed, 12 Jan 2022 17:05:13 +0100 Alexander Dahl <[email protected]> wrote:
Quoted 3 lines · Adrian Perez de Castro

As discussed yesterday, here is a quick stab for testing and getting the conversation started about using Ninja for CMake-based packages (hence the missing documentation updates and the "RFC" tag in the subject :-D).

Quoted 8 lines
Quoted 3 lines

I miss some general motivation for switching from Makefile to Ninja generator. Can you add some reasoning or numbers to upcoming patch set revisions?

Ninja is generally faster, tends to make better use of parallelism, and in my experience less likely to break in odd ways. Once I have a defconfig with a bigger set of CMake-based packages working I'll do some numbers as well to compare build times before and after the switch to Ninja.

There's one disadvantage to Ninja in Buildroot context: until [1] is fixed, it
doesn't collaborate well with top-level parallel build. This means that if you run with a toplevel JLEVEL of e.g. 24, you can easil end up with 40-100 compiles running in parallel. The problem already exists for meson packages, but these are sufficiently rare that they don't pose a problem in practice. I don't know if it's going to become a problem if cmake packages are added to the mix.

I don't think this is blocker at all, but it's worth considering.

Regards,
Arnout

[1] https://github.com/ninja-build/ninja/issues/1139

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#22 lore raw
Quoted 6 lines · On Wed, 12 Jan 2022 19:55:03 +0100 Arnout Vandecappelle <[email protected]> wrote:

There's one disadvantage to Ninja in Buildroot context: until [1] is fixed, it
doesn't collaborate well with top-level parallel build. This means that if you run with a toplevel JLEVEL of e.g. 24, you can easil end up with 40-100 compiles running in parallel. The problem already exists for meson packages, but these are sufficiently rare that they don't pose a problem in practice. I don't know if it's going to become a problem if cmake packages are added to the mix.

meson-based packages are no longer rare: we now have 116 packages using the meson-package infrastructure, including very high profile packages such as systemd, mesa3d, libglib2, and more.

It is still higher than the 328 cmake-based package we have of course, but I wouldn't say that meson is "sufficiently rare" :-)

Annoying that this problem hasn't been resolved in upstream ninja :-/

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#23 lore raw
Quoted 11 lines · Thomas Petazzoni
Quoted 6 lines · On Wed, 12 Jan 2022 19:55:03 +0100 Arnout Vandecappelle <[email protected]> wrote:

There's one disadvantage to Ninja in Buildroot context: until [1] is fixed, it
doesn't collaborate well with top-level parallel build. This means that if you run with a toplevel JLEVEL of e.g. 24, you can easil end up with 40-100 compiles running in parallel. The problem already exists for meson packages, but these are sufficiently rare that they don't pose a problem in practice. I don't know if it's going to become a problem if cmake packages are added to the mix.

Quoted 8 lines

meson-based packages are no longer rare: we now have 116 packages using the meson-package infrastructure, including very high profile packages such as systemd, mesa3d, libglib2, and more.

It is still higher than the 328 cmake-based package we have of course, but I wouldn't say that meson is "sufficiently rare" :-)

Annoying that this problem hasn't been resolved in upstream ninja :-/

We're now using kitware/cmake's fork with jobserver support FYI:
https://github.com/buildroot/buildroot/commit/227d7e0cbaaf093f509f5728f06fad5f53caed7b

Quoted 10 lines

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list [email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#24 lore raw
In reply to Adrian Perez de Castro

Hi Adrián,

Are you still interested to respin this series? It would be nice to have this
feature - especially since e.g. Qt6 in fact *expects* to be built with Ninja.

Quoted 5 lines · Adrian Perez de Castro

Hello everybody,

As discussed yesterday, here is a quick stab for testing and getting the conversation started about using Ninja for CMake-based packages (hence the missing documentation updates and the "RFC" tag in the subject :-D).

Documentation is of course needed for the non-RFC one. For testing, we agreed
that it's sufficient to test on a few (10-20) major packages and rely on the autobuilders for the rest.

Quoted 6 lines

In order to avoid the circular dependency of host-ninja requiring itself, ninja.mk gets changed to use host-generic-package with a build command that plainly runs the compiler on the set of sources we know are needed to build a minimal usable version of it under Unix-y systems. This is basically the list of sources that CMake would have picked (as per the CMakeLists.txt file) passed straight to $(HOSTCXX).

To avoid this hack: we thought it should be simple to allow a package to use
Makefiles instead of Ninja, by:

- using an approach like [1] to call 'cmake' to do the build and install instead of calling 'ninja' directly;

- packages that really require makefiles can pass '-GUnix Makefiles' in <PKG>_CONFIGURE_OPTS (the second -G should override the first one, I hope).

This can be used by ninja to keep on building itself with cmake.

Quoted 23 lines

The next change modifies pkg-cmake.mk to always pass -GNinja and removes the $(<PKG>_INSTALL[_STAGING,_TARGET]_OPTS) variables, because when using Ninja the "install/fast" targets are not generated by CMake (those are an internal detail of the Makefile generator, it seems). For consistency with the Meson package infrastructure variables $(NINJA), $(<PKG>_NINJA_ENV) and $(NINJA_OPTS) are honored by the default set of build/install commands.

Now, there might be packages that break with this, and I would be particularly concerned about things like packages which use CMake and build out-of-tree kernel modules (as the kernel build infrastructure is all Make, and only Make!) but the changes included were enough for me to get Raspberry Pi images built with WebKit (both GTK and WPE ports) in it, which results in the following built using [host-]cmake-package:

- brotli
- cog
- jpeg-turbo
- openjpeg
- webkitgtk
- webp
- woff2
- wpewebkit

Quoted 7 lines

While not a long list by any means, I think it shows a decent sample of packages coming from different development teams that work just fine switching to Ninja.

If anybody can suggest something with a bigger number of CMake packages to build (or a .config file to share) I will be more than happy to give it a test this with these patches applied :)

I think gnuradio is also a good one to test, it has a fairly complicated build
system IIRC.

Quoted 3 lines

Cheers,
-Adrian

Regards,
Arnout

[1] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Quoted 10 lines

Adrian Perez de Castro (2):
package/ninja: do not require cmake package/pkg-cmake.mk: use ninja instead of make

  package/ninja/ninja.mk | 36 +++++++++++++++++++++++++++++++++++-
  package/pkg-cmake.mk   | 24 ++++++++++++++----------
  2 files changed, 49 insertions(+), 11 deletions(-)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot