Skip to content

Commit 7034620

Browse files
committed
[Rust] Have cargo check output in the build dir not source dir
1 parent 5867653 commit 7034620

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rust/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ file(GLOB RUST_API_SOURCES CONFIGURE_DEPENDS
1313
src/*/*.rs)
1414

1515
if(CMAKE_BUILD_TYPE MATCHES Debug)
16-
set(CARGO_CHECK_OPTS --workspace)
16+
set(CARGO_CHECK_OPTS --workspace --target-dir=${PROJECT_BINARY_DIR}/target)
1717
# Documentation for both binaryninja and binaryninjacore-sys crates
18-
set(CARGO_DOC_OPTS --no-deps -p binaryninja -p binaryninjacore-sys)
18+
set(CARGO_DOC_OPTS --no-deps -p binaryninja -p binaryninjacore-sys --target-dir=${PROJECT_BINARY_DIR}/target)
1919
else()
20-
set(CARGO_CHECK_OPTS --workspace --release)
20+
set(CARGO_CHECK_OPTS --workspace --release --target-dir=${PROJECT_BINARY_DIR}/target)
2121
# Documentation for both binaryninja and binaryninjacore-sys crates
22-
set(CARGO_DOC_OPTS --no-deps --release -p binaryninja -p binaryninjacore-sys)
22+
set(CARGO_DOC_OPTS --no-deps --release -p binaryninja -p binaryninjacore-sys --target-dir=${PROJECT_BINARY_DIR}/target)
2323
endif()
2424

2525
if (BN_BUILD_NUMBER)

0 commit comments

Comments
 (0)