Skip to content

Commit

Permalink
Merge pull request #616 from ZettaScaleLabs/fix_cmake_toolchain
Browse files Browse the repository at this point in the history
Ensure build directory contains a copy of rust-toolchain.toml
  • Loading branch information
Mallets authored Aug 23, 2024
2 parents 28518e8 + d79b2b5 commit c996fd3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ else()
configure_cargo_toml(${cargo_toml_dir_release} ${project_version} ${cargo_lib_name_release})
endif()

#
# Copy toolchain configuration to build directory to ensure it is used when cargo is invoked from a directory other
# than the directory containing the manifest file
#
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/rust-toolchain.toml")
file(COPY
${CMAKE_CURRENT_SOURCE_DIR}/rust-toolchain.toml
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endif()

#
# Configure result library names
#
Expand Down

0 comments on commit c996fd3

Please sign in to comment.