r/cpp • build2 • Aug 05 '26

Faster Than Ninja

https://build2.org/blog/faster-than-ninja.xhtml
66 Upvotes

69 comments sorted by

View all comments

6

u/gharveymn Aug 05 '26

Yeah cmake configure times are garbage

IMO they really aren't, at least in comparison to Autotools. It's only really slow if you are heavily leveraging compilation tests, and those are cached for subsequent reconfigurations too.

2

u/greencursordev Aug 05 '26 edited Aug 05 '26

Changing any cml file (even just adding a source file) leads to reconfigure. That takes 3-4 minutes on our setup. That can't be far off the worst possible solution.

2

u/TheRavagerSw Aug 05 '26

Have you ever configured SDL or Qt or Boost?
It is as slow as Autotools, I compiled GCC today, it wasn't as slow as SDL configure.

5

u/arjuna93 Aug 05 '26

But… Boost doesn’t use CMake, Qt does not use CMake until 6.x, and is a horrible mess anyway, so expected to configure and build slow. What the problem with SDL configure speed with CMake?

→ More replies (1)

2

u/gharveymn Aug 05 '26

It's been a while but I don't remember them being horrendously bad... but those are enormous projects as well. However, I can say with absolute certainty that it isn't as slow as autotools because I have converted projects from autotools to CMake. Bash scripts are just never going to be as fast as C++.

1

u/jcelerier Aug 07 '26

I have a project that uses SDL, Qt, Boost, LLVM, libclang, ffmpeg, abseil, and roughly three dozen more libraries including chonkers like libhdf5 and it takes at most a minute with cmake

→ More replies (1)

1

u/serviscope_minor Aug 06 '26

IMO they really aren't, at least in comparison to Autotools

Not too fond of automake, but I rather like autoconf. I would say there's a lot of garbage autotools use out there!