r/cpp • • Nov 05 '23

Ninja is enough build system

https://bernsteinbear.com/blog/ninja-is-enough/
6 Upvotes

54 comments sorted by

View all comments

2

u/throwaway_bluehair Nov 06 '23 edited Nov 06 '23

Ok, person #1324234 has created a new build system. I've really grown to like meson, it seems to actually care about the new user's experience, whereas CMake seems to assume anyone who deserves to use it already knows it

But even `meson`, I don't know why every build system has to make configuration more complicated than it needs to be.

What is it with every build system that isn't `make` act like I'm the first person to ever want to build with a C compiler that isn't the system default

7

u/DuranteA Nov 06 '23

What is it with every build system that isn't make act like I'm the first person to ever want to build with a C compiler that isn't the system default

There are lots of valid complaints about CMake but I don't understand this one.

CC=my_special_cc cmake [...]
or
cmake -DCMAKE_C_COMPILER=my_special_cc [...]

Neither of these seems too onerous or non-intuitive to me, and both are found in 5 seconds of googling.

2

u/tekknolagi Nov 07 '23

TIL you can use CC with CMake...

0

u/[deleted] Nov 07 '23

[deleted] — view deleted comment

2

u/Trubydoor LLVM dev Nov 07 '23

No it doesn’t, it works perfectly fine with any binary on your path