Skip to content

Fix clean builds when CMake is using Unix Makefiles #7239

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

Merged
merged 1 commit into from
Aug 9, 2025

Conversation

bdash
Copy link
Contributor

@bdash bdash commented Aug 6, 2025

The $<TARGET_FILE:binaryninjaapi> syntax does not do what is intended for Unix Makefiles.

In practice there's no reason for this custom command to depend on the binaryninjaapi target. The Rust API uses core's C APIs directly rather than via the C++ API, and it already depends on binaryninjacore.h via RUST_API_SOURCES. Since it's running cargo check and not doing a full compilation this header-only dependency is sufficient.

The `$<TARGET_FILE:binaryninjaapi>` syntax does not do what is intended
for Unix Makefiles.

In practice there's no reason for this custom command to depend on the
`binaryninjaapi` target. The Rust API uses core's C APIs directly rather
than via the C++ API, and it already depends on binaryninjacore.h via
`RUST_API_SOURCES`. Since it's running `cargo check` and not doing a
full compilation this header-only dependency is sufficient.
@bdash bdash force-pushed the rust-api-cmake-makefiles branch from d29feb4 to 72e0b2f Compare August 9, 2025 05:00
@bdash bdash merged commit 72e0b2f into dev Aug 9, 2025
9 of 10 checks passed
@bdash bdash deleted the rust-api-cmake-makefiles branch August 9, 2025 05:04
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