cmake ftw
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 totalIt 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).
Discovery is the wrong thing to do nowadays.
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.