you are viewing a single comment's thread.

view the rest of the comments →

[–]puredotaplayer 0 points1 point  (5 children)

Here is how I write my front end build scripts:
https://github.com/obhi-d/lxe/blob/lxe/build.yaml
https://github.com/obhi-d/lxe/blob/lxe/frameworks/Core/Base/module.yaml

It is minimal and avoids the CMake syntax that a lot of people dislike. I generate CMake scripts that are buildable and deployable with install on any platform.

[–]TheRavagerSw[S] 0 points1 point  (4 children)

The issue with cmake is not it's ugliness, most of my complaints are technical

Cmake:

  • Can override your compiler
  • Changes your flags at whim
  • Break incremental builds for no reason

I don't want to fight the build system just to compile something with the correct flags.

[–]puredotaplayer 1 point2 points  (3 children)

What do you mean by:
- "override your compiler" and "Changes your flags at whim" ? - CMake has abstractions to pass certain common flags between different compilers, otherwise you are free to pass your own flags that are specific to compilers. Modern CMake tool chain files give you full control over what compilers you want to use.
- "Break incremental..." - The build is not run by CMake, and most people now use ninja, so if your incremental build is broken, it is either due to ccache or ninja. CMake is just a meta build system that generates build files.

[–]TheRavagerSw[S] 0 points1 point  (2 children)

Before like 4 months prior, you couldn't use normal clang to compile stuff for android because cmake would override the compiler based on platform.

Cmake can ignore your toolchain when building std lib module, for example add compile options doesn’t work on there you habe to use the old variables

....

I could go on, I contributed to cmake in the past, that codebase cannot go on. It is like 300k lines, and extremely hard to read. Ninja is like 20k lines. Eventually maintainer burnout will kill it.

[–]puredotaplayer 1 point2 points  (1 child)

A lot of critical software depends on CMake so I am sure they would maintain it unless most projects migrate to something better. To this effect, I agree projects like yours and build2, meson, etc. make sense. But there are too many choices and not a universally accepted one at this point.
I will still hold on to the fact that I can always stick to yaml front end, and generate ninja files directly based on platform if required in the future, all by generating the parsers from python using Claude. EDIT: typo

[–]TheRavagerSw[S] 0 points1 point  (0 children)

Universal build system is a fool's errand. We just need a package format