Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cbindgen by regenerating bindings only when necessary #435

Merged
merged 1 commit into from
Nov 4, 2023

Conversation

jschwe
Copy link
Collaborator

@jschwe jschwe commented Aug 25, 2023

The new v0.25.0 release of cbindgen adds a --depfile option, that CMake can use to determine when to re-run cbindgen.
This feature requires the DEPFILE parameter of add_custom_command and is available on most generators by now.
If CMake is too old, or the Generator does not support DEPFILE, then we fallback to always rerunning cbindgen as before.

This allows us to regenerate the bindings only when necessary
@jschwe jschwe marked this pull request as ready for review November 4, 2023 07:34
@jschwe jschwe merged commit e9aaa32 into corrosion-rs:master Nov 4, 2023
36 checks passed
@jschwe jschwe deleted the cbindgen_depfile branch November 4, 2023 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant