Extremely poor quality of KWave's build system

Luca Beltrame lbeltrame at kde.org
Thu May 25 05:07:41 UTC 2017


Il giorno Thu, 25 May 2017 09:25:02 +1200
Ben Cooksley <bcooksley at kde.org> ha scritto:

[Quoting Ben but responding to Thomas, since I'm not subscribed to
kde-buildsystem]

> > complained about the quality of Kwave's build system in the last 18
> > years in such a way and nobody had a serious problem with the
> > dependencies.  

The major problem with the approach you use is that CMake aborts with a
fatal error in configure stage as soon as a missing dependency is
encountered. There may be more, but you don't know, because it aborts.
So it's like a cat and mouse game unless you have everything installed. 

The correct way to do so is to avoid REQUIRED in find_package() calls
and use instead set_package_properties() to set what is required, and
what is optional. Please take a look at any other KDE software project
to see how it's done.

A tl;dr version would be:

include(FeatureSummary)

[...]
find_package(foo)
set_package_properties(foo PROPERTIES TYPE REQUIRED PURPOSE "Required
to bar the foo.")
[... at the end of the CMakeLists.txt]
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

The advantage? CMake will configure things till the end and *then* list
*all* the missing dependencies in one fell swoop. Much easier for
packaging, too.

> > *POLITELY* and with reasonable arguments. But if I only get comments
> > like "fuck you, all your stuff sucks" - I WILL DEFINITELY NOT
> > CHANGE ANY SINGLE LINE FOR YOU !!!  

THe fact that the original mail had a harsh tone does not warrant a
same, or an increased one. Can we just focus on fixing the problem?
Note: as a packager, I rely a lot on CMake output as well as READMEs.
Failing stuff like I described above makes my work (and probably many
others') harder.

-- 
Luca Beltrame - KDE Forums team
GPG key ID: A29D259B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Firma digitale OpenPGP
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20170525/ec7560c8/attachment.sig>


More information about the Kde-buildsystem mailing list