diff options
-rw-r--r-- | var/spack/repos/builtin/packages/spglib/package.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/spglib/package.py b/var/spack/repos/builtin/packages/spglib/package.py index 2715f3f3c0..1d00091c13 100644 --- a/var/spack/repos/builtin/packages/spglib/package.py +++ b/var/spack/repos/builtin/packages/spglib/package.py @@ -48,10 +48,15 @@ class Spglib(CMakePackage): version("1.10.0", sha256="117fff308731784bea2ddaf3d076f0ecbf3981b31ea1c1bfd5ce4f057a5325b1") 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:") @property def libs(self): return find_libraries("libsymspg", root=self.prefix, shared=True, recursive=True) def cmake_args(self): - return [self.define_from_variant("USE_OMP", "openmp")] + pfx = "SPGLIB_" if self.spec.satisfies("@2.1.0:") else "" + return [ + self.define_from_variant(pfx + "USE_OMP", "openmp"), + self.define_from_variant(pfx + "WITH_Fortran", "fortran"), + ] |