I have a directory containing a repo and a build folder. The build folder contains the complete build of objects, as triggered using ninja
. I want thousands of copies of this directory where just one source file will be different between copies. I'm hoping to use ninja
on these copied directories, triggering an incremental, rather than complete build, making the build much faster. However, running ninja
in a copied directory, even with no changes applied, performs a total rebuild. The copied directory already contains all of the built objects so this is wasteful.
How does ninja detect which files have to be rebuilt and how might I go about changing the copied directory to avoid the full rebuild?
Turns out the timestamps of copies have to be the same too. I was using cp -r source dest
but I should have added the flag to copy timestamps: cp -rp source dest
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With