4 Commits

Author SHA1 Message Date
Jonathan Schwender
25132a3690 Add --depfile option
Add an option to output a depfile for outside build-systems to learn
the source file dependencies of the bindings.
This can be used by 3rd party build system integrations to only rerun
bindgen when necessary.

Testing is done via CMake integration tests, since CMake
is a 3rd party buildsystem which supports depfiles.
2023-05-29 18:56:53 +02:00
Jonathan Schwender
cb42a00ab6 Improve cbindgen detection in tests
Since our MSRV is now Rust 1.54, we can rely on cargo setting `CARGO_BIN_EXE_cbindgen`
to the cbindgen path in integration tests.
This is more reliable than guessing the path, since cargo knows where it placed the bin.
2023-05-29 18:56:53 +02:00
Emilio Cobos Álvarez
357f34460d Do a better job at detecting the final binary location.
Still not great, I guess we should convert the tests to run the library version
of cbindgen, but this trivially-fixes #342.
2019-05-23 16:40:06 +02:00
Emilio Cobos Álvarez
2bb3e9ba66 Use cargo test instead of test.py.
This makes cargo test test all the stuff in tests/rust, and thus makes tests.py
unnecessary.

Co-authored-by: Axel Nennker <axel.nennker@telekom.de>
2019-04-20 00:30:58 +02:00