Closed lammermann closed 4 years ago
It sounds like the build script is not re-run when the file change.
Ah I see,
I've recently added some println!("cargo:rerun-if-changed=my_source_file.cc");
lines to the end of my build script. Maybe they override the re-run settings for my rust sources.
Is there any way I can make sure my cpp sources are appended to my re-run configuration while also keeping my build script run once the rust sources change?
Yes, that's why.
By default the build script is run for every change, but if there is a rerun-if-changed
, then it doesn't
Is there any way I can make sure my cpp sources are appended to my re-run configuration while also keeping my build script run once the rust sources change?
That could be an interesting feature. Right know you will have to do that manually.
Ok thanks.
So I'm closing this now. However shall I open a feature request for supporting additional cargo:rerun-if-changed
statements?
Hi, I get the following error when changing the code inside my
cpp!
macro:Strangely I only get this when I change my code (no matter what I change) but the first time when I compile it it works fine. My current workaround is to delete the caches of my crate every time I change the contents inside a cpp macro.
I have no idea what causes this as I don't know macros that much but it seems to have something to do with caches.
Any help is highly appreciated. Greetings, Benjamin