From 91011a8c5f0ef9bce66a117468edebb2b0e373ed Mon Sep 17 00:00:00 2001 From: Stephen Sachs Date: Tue, 12 Sep 2023 01:49:18 +0200 Subject: [gromacs] Fix 2021.2 build error (#39722) * [gromacs] Fix 2021.2 build error See https://gromacs.bioexcel.eu/t/compilation-failure-for-gromacs-2021-1-and-2021-2-with-cmake-3-20-2/2129 * Update var/spack/repos/builtin/packages/gromacs/package.py Co-authored-by: Andrey Alekseenko --------- Co-authored-by: Andrey Alekseenko --- var/spack/repos/builtin/packages/gromacs/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 9243bc60c8..a4a024eb1c 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -275,6 +275,12 @@ class Gromacs(CMakePackage, CudaPackage): patch("gmxDetectCpu-cmake-3.14.patch", when="@2018:2019.3^cmake@3.14.0:") patch("gmxDetectSimd-cmake-3.14.patch", when="@5.0:2017^cmake@3.14.0:") + # 2021.2 will always try to build tests (see https://gromacs.bioexcel.eu/t/compilation-failure-for-gromacs-2021-1-and-2021-2-with-cmake-3-20-2/2129) + patch( + "https://gitlab.com/gromacs/gromacs/-/commit/10262892e11a87fda0f59e633c89ed5ab1100509.diff", + sha256="2c30d00404b76421c13866cc42afa5e63276f7926c862838751b158df8727b1b", + when="@2021.1:2021.2", + ) filter_compiler_wrappers( "*.cmake", relative_root=os.path.join("share", "cmake", "gromacs_mpi") -- cgit v1.2.3-70-g09d2