I’ve been keeping a set of scripts to keep parallel builds of a few projects, to be able to test whether everything behaves well on older compilers. It is also nice to compile things with clang while developing since it usually provides nicer error messages compared to gcc, even if might be slower or generate slower code.
The main problem is that the setup was not really scalable. Adding new build profiles, or projects was not as easy as it ought to be.
kdesrc-build-extra is a simple tool that creates profile-based alternative builds to those created by kdesrc-build. It does not do it for all projects, but only for those that you choose.
It allows you to create a few profiles, and specify which projects you want built with each of them. So, for example, you can keep parallel builds of plasma-workspace with gcc 4.5 and the latest clang, while having a static checker like clang-analyze for plasma-framework.
The example configuration file comes with the program. The format is the same as the one used by kdesrc-buildrc, just with a few custom fields.
This is one of the profiles from the provided example configuration file:
Now comes a bit weird part. Since these kinds of scripts in KDE tend to cover all programming languages in existence - perl, ruby, python and similar, I decided to go over the edge and do this in Haskell.
Thanks to Haskell’s package manager, the installation is quite simple.
(you just need to install cabal and ghc before doing that)
Copy the kdesrc-build-extrarc-example file into the KF5 sources directory, edit it to fit your setup, and that is it.