mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Merge pull request #44762 from azat/build/rust-in-bin-dir
Build rust modules from the binary directory
This commit is contained in:
commit
b8e9a065e9
@ -39,5 +39,21 @@ function(clickhouse_import_crate)
|
||||
corrosion_import_crate(NO_STD ${ARGN})
|
||||
endfunction()
|
||||
|
||||
add_subdirectory (BLAKE3)
|
||||
add_subdirectory (skim)
|
||||
# Add crate from the build directory.
|
||||
#
|
||||
# Our crates has configuration files:
|
||||
# - config for cargo (see config.toml.in)
|
||||
# - and possibly config for build (build.rs.in)
|
||||
#
|
||||
# And to avoid overlaps different builds for one source directory, crate will
|
||||
# be copied from source directory to the binary directory.
|
||||
file(COPY ".cargo" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
function(add_rust_subdirectory src)
|
||||
set(dst "${CMAKE_CURRENT_BINARY_DIR}/${src}")
|
||||
message(STATUS "Copy ${src} to ${dst}")
|
||||
file(COPY "${src}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
add_subdirectory("${dst}" "${dst}")
|
||||
endfunction()
|
||||
|
||||
add_rust_subdirectory (BLAKE3)
|
||||
add_rust_subdirectory (skim)
|
||||
|
Loading…
Reference in New Issue
Block a user