[Development] Build system for Qt 6

Kuba Ober kuba at mareimbrium.org
Tue Nov 13 19:42:32 CET 2018



> 29 okt. 2018 kl. 08:17 skrev Lars Knoll <lars.knoll at qt.io>:
> 
> As you will probably remember, there have been lively discussions around what kind of build tool to use for Qt 6 both during Qt Contributor Summits as well as on this mailing list.
> 
> There has been a strong consent that we should move away from qmake as our build tool for Qt due to many shortcomings and the burden we have maintaining the system.

For what it’s worth, the easiest way I found to keep the investment we had internally at work in qmake projects was to get it to produce ninja output. We used it for C/assembly firmware builds – completely unrelated to Qt, and started doing it sometime around Qt 4 beta era. I can’t say how good of a decision it was, but it worked (still works!)… and then I moved everything over to cmake.

I ended up tackling qtcore builds with cmake for good measure –  predating the current Qt-with-cmake effort by a year or two. I wasn’t too brave there at all, though, and qmake still does configure work for Qt, so it’s not really something that would be usable as-is for Qt itself; it’s a novelty if that. I also maintained qbs builds for everything that cmake built for us, sans qtcore – but I’m not particularly enamored with either. They both have quirks, to say the least.

I have no strong opinions otherwise, so my only question is: would the Qt project be willing to consider merging ninja output mode into qmake at all? I’d get it into reviewable shape if so, or let it die in obscurity otherwise. As far as I can tell, it builds everything that uses qmake with no trouble, on platforms I have access to: certainly all of Qt 5.11 and 4.8, and a few other projects I tried, but perhaps I’d extend that coverage before considering it “good enough to go into the wild”.

At the very least, for everyone who laments the inefficiency of recursive make/jom, it provides an instant “fix” that can slash no-work-done builds by an order of magnitude or more (Qt builds really benefit) – there’s no recursion at all, not even qmake recursion. Yeah, getting rid of that was a prerequisite.

As a curiosity, a friend had implement most of late-70s-era HP Basic inside qmake, including line number support, as a bar bet of sorts, but I’m not sure whether that makes any of my efforts look much saner in comparison :) Now that I think of it, I should be able to put that up on GitHub sometime.

Cheers, Kuba Ober


More information about the Development mailing list