mirror of https://github.com/Cisco-Talos/clamav
It isn't obvious if a build fails because the Rust version is too low. The FindRust.cmake module already has logic to check the min supported Rus version. This commit make use of that, adding a Rust version var at the top of CMakeLists.txt. We will have to update it any time we run `cargo update`, before releasing a new feature version. If your Rust version is too low (or you artificially crank up the min version for testing, the error will look like this: -- Rust tool `cargo` found: /home/micah/.cargo/bin/cargo, 1.85.0 -- Rust tool `rustc` found: /home/micah/.cargo/bin/rustc, 1.85.0 -- Rust tool `rustup` found: /home/micah/.cargo/bin/rustup, 1.28.1 -- Rust tool `rust-gdb` found: /home/micah/.cargo/bin/rust-gdb, 9.2 -- Rust tool `rust-lldb` not found: Failed to determine version. -- Rust tool `rustdoc` found: /home/micah/.cargo/bin/rustdoc, 1.85.0 -- Rust tool `rustfmt` found: /home/micah/.cargo/bin/rustfmt, 1.8.0 -- Rust tool `bindgen` not found. CMake Error at cmake/FindRust.cmake:412 (message): Your Rust toolchain is to old to build this project: 1.85.0 < 1.100.0 Call Stack (most recent call first): CMakeLists.txt:144 (find_package) -- Configuring incomplete, errors occurred! Fixes: https://github.com/Cisco-Talos/clamav/issues/1480pull/1481/head
parent
00886ee90d
commit
4f361f23e8
Loading…
Reference in new issue