don't re-build a unchanged cmake dependency
When compiling a project that has a cmake dependency it'll re-compile the dependency every time cargo is run.
This crate already has some logic to avoid rebuilding too much, but it sounds like it's still happening for you? Can you post an example to poke around with?
I'm having a similar issue. I'm not sure what exactly is getting rebuilt (is there any way to get more output from cmake-rs from cargo as opposed to just the progress bar?) but it's not the whole cmake project as that would take a really long time. My project is here: https://github.com/anderslanglands/oiio-rs
Changing anything in the rust part causes cmake to rebuild even though always_configure is false.
Same here, I tried setting always_configure(false) but no effect, still rebuilds from scratch.
For now used a workaround
let built_marker = out_dir.join(".built");
if !built_marker.exists() {
cmake::/* ... */
std::fs::File::create(built_marker).unwrap();
}
this will likely cause issues when some flags change, but at least avoids rebuilding the C++ dependency of my project all the time.