mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Build rust modules from the binary directory
Our crates has configuration files: - config for cargo (see config.toml.in) - and possibly config for build (build.rs.in) Previously it uses source directory, and it will overrides files in the source directory, which will require recompile of crates in case of multiple builds for one source directory. To avoid overlaps different builds for one source directory, crate will be copied from source directory to the binary directory. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
bc456feb4b
commit
89c071e291
@ -39,5 +39,21 @@ function(clickhouse_import_crate)
|
|||||||
corrosion_import_crate(NO_STD ${ARGN})
|
corrosion_import_crate(NO_STD ${ARGN})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
add_subdirectory (BLAKE3)
|
# Add crate from the build directory.
|
||||||
add_subdirectory (skim)
|
#
|
||||||
|
# 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