On 04/06/2018 04:15 PM, Niels Thykier wrote:
Control: tags -1 +patch
Kyle Edwards:
Package: debhelper
Version: 11.1.6
Severity: wishlist
Dear Maintainer,
Large projects which use CMake, such as VTK, take a long time to build
with the Makefile generator, and see significant build time improvements
when being built with the Ninja generator instead. Please consider
adding support for using the Ninja generator with CMake. Perhaps
something like:
$ dh --buildsystem=cmakeninja
I realize this may be tricky given how the buildsystems are implemented
in debhelper. I don't know much about Perl, but if it supports multiple
inheritance, would it be possible to make a class like "cmakebase" and
then have "cmake" and "cmakeninja" inherit from both "cmakebase" and
then "makefile" and "ninja" respectively?
[...]
Ok, I have written a sample patch series (attached) that should make
debhelper support cmake with the ninja backend.
The chosen syntax is:
dh <target> --buildsystem=cmake+ninja
A review and some testing would be appreciated.
Thanks,
~Niels
Just tested it, and I like it.
One thing I did notice is that if your project doesn't have tests, you
have to turn on nocheck when switching to cmake+ninja, because the ninja
buildsystem fails if no "test" target exists (the makefile buildsystem
seems to silently ignore the failure.) I don't think this is a
deal-breaker, but it is something to keep in mind when switching to
ninja. Perhaps this could be filed as a separate bug.
Thank you for the quick response! I hope to see this in debhelper soon.
Kyle