diff options
author | dmt4 <dmt4@users.noreply.github.com> | 2023-10-27 07:55:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-27 08:55:57 +0200 |
commit | af13d16c2c2fda32e47f7300b31d805df64f8581 (patch) | |
tree | 0a075f2209631cc15004df063dc9421ded3b66ea | |
parent | 37f48aff8bda58ca89d92c925a4fae86208a8bc5 (diff) | |
download | spack-af13d16c2c2fda32e47f7300b31d805df64f8581.tar.gz spack-af13d16c2c2fda32e47f7300b31d805df64f8581.tar.bz2 spack-af13d16c2c2fda32e47f7300b31d805df64f8581.tar.xz spack-af13d16c2c2fda32e47f7300b31d805df64f8581.zip |
Fixes and options for package spglib (#40684)
* Fix cmake_args for spglib v2.1.0+
* Add option to build fortran interface in package spglib
* fix style as sugested by ci/prechecks/style
* Enable fortran variant from v1.16.4 as suggested
Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
---------
Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
-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"), + ] |