5 ms·
cmake ftw
by psyclobe 1y ago
cmake ftw
- aldanor 1y agoYou mean cargo build
- yjftsjthsd-h 1y ago... can cargo build things that aren't rust? If yes, that's really cool. If no, then it's not really in the same problem domain.
- kouteiheika 1y agoNo it can't. It can build a Rust program (build.rs) which builds things that aren't Rust, but that's an entirely different use case (building non-Rust library to use inside of Rust programs).
- crabbone 1y agoThere's GprBuild (Ada tool) that can build C (not sure about C++). It also has more elaborate configuration structure, but I didn't use it extensively to tell what exactly and how exactly does it do it. In combination with Alire it can also manage dependencies Cargo-style.
- touisteur 1y agoGot it to build C++, CUDA and IIRC SYCL too.
- malkia 1y agocmake uses configure, or configure-like too!
- ahartmetz 1y agoSame concept, but completely different implementation.
- malkia 1y agostill slow, even if it does multiple processes - lots of "discovery" that are only on your machine, or whatever the CI machine had in mind. Instead it should be - "You should expect this, that and that", and by nature of building it - it fails. Discovery is the wrong thing to do nowadays.
- ahartmetz 1y agoI don't think I'd want a "fail late with a possibly unclear error" build system. There is also the problem that finding the path of dependencies happens at the same time as finding if you have them, and removing one without the other doesn't seem to be very useful. At best, I think you could have a system that defers some / most dependency discovery until after configure time, but still aborts the build with "required libfoo >= 0.81.0 not found" if necessary. And no, you are not going to be able to tell everyone exactly where everything needs to be installed unless it's an internal product.
- malkia 1y agoSure, to all to their needs. In my case I want reproducible build, but to start I first want build that at least passes the same compiler flags around, and links same things no matter what the computer is (it can still be different when comes to OS).
- JCWasmx86 1y agoOr meson is a serious alternative to cmake (Even better than cmake imho)
- torarnv 1y agoCMake also does sequential configuration AFAIK. Is there any work to improve on that somewhere?
- OskarS 1y agoMeson and cmake in my experience are both MUCH faster though. It’s much less of an issue with these systems than with autotools.
- tavianator 1y agoJust tried reconfiguring LLVM: 27.24s user 8.71s system 99% cpu 36.218 total Admittedly the LLVM build time dwarfs the configuration time, but still. If you're only building a smaller component then the config time dominates: ninja libc 268.82s user 26.16s system 3246% cpu 9.086 total