Skip to content

Improve cbindgen by regenerating bindings only when necessary#435

Merged
jschwe merged 1 commit intocorrosion-rs:masterfrom
jschwe:cbindgen_depfile
Nov 4, 2023
Merged

Improve cbindgen by regenerating bindings only when necessary#435
jschwe merged 1 commit intocorrosion-rs:masterfrom
jschwe:cbindgen_depfile

Conversation

@jschwe
Copy link
Copy Markdown
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
@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