From 72e0b2f89352bf45af44629c97741977090dcd78 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Wed, 6 Aug 2025 11:21:39 -0700 Subject: [PATCH] Fix clean builds when CMake is using Unix Makefiles The `$` 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. --- rust/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/CMakeLists.txt b/rust/CMakeLists.txt index 03ab89bca5..caead2d975 100644 --- a/rust/CMakeLists.txt +++ b/rust/CMakeLists.txt @@ -49,7 +49,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env BINARYNINJADIR=${BN_INSTALL_BIN_DIR} ${RUSTUP_CHECK_COMMAND} ${CARGO_CHECK_OPTS} COMMAND ${CMAKE_COMMAND} -E touch ${PROJECT_BINARY_DIR}/rust_api.stamp WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - DEPENDS ${RUST_API_SOURCES} $ + DEPENDS ${RUST_API_SOURCES} COMMENT "Checking Rust API" VERBATIM )