diff --git a/cmake/init-corrosion.cmake b/cmake/init-corrosion.cmake index a73fd84a..05fac229 100644 --- a/cmake/init-corrosion.cmake +++ b/cmake/init-corrosion.cmake @@ -9,7 +9,7 @@ set(Rust_CARGO_TARGET_LINK_NATIVE_LIBS "") file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/rust-toolchain.toml" Rust_TOOLCHAIN REGEX "^channel ?=") string(REGEX MATCH "[0-9.]+" Rust_TOOLCHAIN "${Rust_TOOLCHAIN}") execute_process(COMMAND rustup toolchain install ${Rust_TOOLCHAIN}) -execute_process(COMMAND rustup target add wasm32-wasi) +execute_process(COMMAND rustup target add --toolchain ${Rust_TOOLCHAIN} wasm32-wasi) CPMAddPackage("gh:corrosion-rs/corrosion#be76480232216a64f65e3b1d9794d68cbac6c690") string(TOLOWER ${Rust_CARGO_HOST_ARCH} HOST_ARCH)