From 22980b9e6501d6ab5f10b0713e0ec496bd1f2bfb Mon Sep 17 00:00:00 2001 From: simonLeary42 <71396965+simonLeary42@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:03:23 -0400 Subject: [PATCH] rust: update `cmake` dependency ranges (#45145) --- var/spack/repos/builtin/packages/rust/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py index d7ed9624658..fdcbdc5c852 100644 --- a/var/spack/repos/builtin/packages/rust/package.py +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -54,7 +54,6 @@ class Rust(Package): variant("src", default=True, description="Include standard library source files.") # Core dependencies - depends_on("cmake@3.13.4:", type="build") depends_on("curl+nghttp2") depends_on("libgit2") depends_on("libssh2") @@ -64,6 +63,12 @@ class Rust(Package): depends_on("python", type="build") depends_on("zlib-api") + # cmake dependency comes from LLVM. Rust has their own fork of LLVM, with tags corresponding + # to each Rust release, so it's easy to loop through tags and grep for "cmake_minimum_required" + depends_on("cmake@3.4.3:", type="build", when="@:1.51") + depends_on("cmake@3.13.4:", type="build", when="@1.52:1.72") + depends_on("cmake@3.20.0:", type="build", when="@1.73:") + # Compiling Rust requires a previous version of Rust. # The easiest way to bootstrap a Rust environment is to # download the binary distribution of the compiler and build with that.