@dse said in WTF Bites:
CMake is one of them, but if it is a new project start with the best: meson
My problem when choosing a build tool is that all of them boast how easy it is to build a simple project with them. Well, simple project is simple, my project will not be. So what I would really like to see in a feature description of a build system is how a build description would look for a project that includes following build steps:
- python script generates some resources and some C++ headers,
- a C++ executable is built and run to generate some more resources and more C++ headers,
- a C++ library is built,
- headers for the library are exported to the build directory in slightly different layout¹,
- the C++ application core is compiled for the host² platform,
- it is linked with a C# UI into a Windows Universal application,
- it is linked with an Android/Java UI into an Android application,
- it is linked with an Objective C UI into an iOS application,
- each version is packaged with the generated resources,
- the results of steps 1–3 may be done once and provided to the platform-specific run³
This actually resembles the previous project I worked on quite closely with some twists from the current one thrown in. And of course, I require that it can not only be done, but that it is also efficient, i.e. that it won't do unnecessary work⁴.
¹ Build system of the application I am working on now does that for histerical raisins. Yes, it is a and huge complication, but most projects in the wild do contain some legacy stuff, so I expect the build system to be able deal with it.
² The three platforms involved in a build are ‘build’, which is where the build system is executed, ‘host’, where the produced binary will run and ‘target’, which is what the produced binary will produce output for and which is mostly only relevant for compilers.
³ This actually quite closely resembles my previous project. We had a custom resource format, the tool to generate it ran only on Windows, but you can only build for iOS on MacOS, so the build server first ran the resource generation part and then copied the output to the next step that ran on a separate MacOS build slave.
⁴ We used a hack based on rule for precompiled headers in our Android build, which had the problem that when any header changed, all headers for the component were considered changed for the next component build. Colleague lately rewrote it to another hack that runs during the makefile rebuild phase, which is better, but still a hack.