RFC Use Ninja as build tool for CMake-based packages
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest7 patches 3 repliesIn review
- v1 RFC2 patches 11 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | package/ninja: do not require cmakepackage/ | +35 | 0 replies | |
| 2/7 | package/pkg-cmake.mk: use ninja instead of makepackage/ | +14 | 1 reply | |
| 3/7 | package/musepack: use MUSEPACK_NINJA_OPTSpackage/ | +1 | 1 reply | |
| 4/7 | package/mariadb: use HOST_MARIADB_NINJA_OPTSpackage/ | +1 | 0 replies | |
| 5/7 | package/kf5/kf5-extra-cmake-modules: do not build documentationpackage/ | +5 | 0 replies | |
| 6/7 | package/libcorrect: avoid multiple rules for same targetpackage/ | +2 | 0 replies | |
| 7/7 | package/racehound: add patch to support building with ninjapackage/ | +112 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [Buildroot] [PATCH RFC v2 0/7] 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
Makefilegenerator, 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