Skip to content

Commit d29feb4

Browse files
committed
Fix clean builds when CMake is using Unix Makefiles
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.
1 parent abfd08f commit d29feb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ add_custom_command(
4949
COMMAND ${CMAKE_COMMAND} -E env BINARYNINJADIR=${BN_INSTALL_BIN_DIR} ${RUSTUP_CHECK_COMMAND} ${CARGO_CHECK_OPTS}
5050
COMMAND ${CMAKE_COMMAND} -E touch ${PROJECT_BINARY_DIR}/rust_api.stamp
5151
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
52-
DEPENDS ${RUST_API_SOURCES} $<TARGET_FILE:binaryninjaapi>
52+
DEPENDS ${RUST_API_SOURCES}
5353
COMMENT "Checking Rust API"
5454
VERBATIM
5555
)

0 commit comments

Comments
 (0)