summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoris Ercole <30901257+lorisercole@users.noreply.github.com>2024-01-23 19:38:42 +0100
committerGitHub <noreply@github.com>2024-01-23 11:38:42 -0700
commitb3d0f19fe7a057778a72ffabefe5ec4f8f763ca8 (patch)
tree20ac61089175a8c183a3f7729459ce422af18bd5
parent9be7f2328f785c8e172ce58d8281802d1eb28ece (diff)
downloadspack-b3d0f19fe7a057778a72ffabefe5ec4f8f763ca8.tar.gz
spack-b3d0f19fe7a057778a72ffabefe5ec4f8f763ca8.tar.bz2
spack-b3d0f19fe7a057778a72ffabefe5ec4f8f763ca8.tar.xz
spack-b3d0f19fe7a057778a72ffabefe5ec4f8f763ca8.zip
spglib: add tests variant and cmake requirement (#42242)
Fixes #42241
-rw-r--r--var/spack/repos/builtin/packages/spglib/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/spglib/package.py b/var/spack/repos/builtin/packages/spglib/package.py
index d4271f106a..ebba58e552 100644
--- a/var/spack/repos/builtin/packages/spglib/package.py
+++ b/var/spack/repos/builtin/packages/spglib/package.py
@@ -52,6 +52,10 @@ class Spglib(CMakePackage):
variant("openmp", default=True, description="Build with OpenMP support", when="@1.16.2:")
variant("fortran", default=True, description="Build Fortran interface", when="@1.16.4:")
+ variant("tests", default=False, description="Build with tests", when="@2.1.0:")
+
+ depends_on("cmake@3.15:", type="build", when="@2.1.0:")
+ depends_on("cmake@3.24:", type="build", when="+tests")
@property
def libs(self):
@@ -62,4 +66,5 @@ class Spglib(CMakePackage):
return [
self.define_from_variant(pfx + "USE_OMP", "openmp"),
self.define_from_variant(pfx + "WITH_Fortran", "fortran"),
+ self.define_from_variant(pfx + "WITH_TESTS", "tests"),
]