xtb: fix la_backend logic (#38309)

This commit is contained in:
Leopold Talirz 2023-08-23 11:08:13 +02:00 committed by GitHub
parent d355880110
commit 5090023e3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,17 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class TestDrive(MesonPackage):
"""Simple testing framework for Fortran packages"""
homepage = "https://github.com/fortran-lang/test-drive"
url = "https://github.com/fortran-lang/test-drive/releases/download/v0.4.0/test-drive-0.4.0.tar.xz"
maintainers("awvwgk")
version("0.4.0", "effabe5d46ea937a79f3ea8d37eea43caf38f9f1377398bad0ca02784235e54a")

View File

@ -23,9 +23,11 @@ class Xtb(MesonPackage):
depends_on("meson@0.57.2:", type="build")
depends_on("mctc-lib")
depends_on("pkgconfig", type="build")
depends_on("tblite", when="@6.6.0:")
depends_on("tblite", when="+tblite")
depends_on("test-drive", type="build")
variant("openmp", default=True, description="Use OpenMP parallelisation")
variant("tblite", default=True, when="@6.6.0:", description="Use tblite for xTB calculations")
def meson_args(self):
lapack = self.spec["lapack"].libs.names[0]
@ -34,7 +36,7 @@ def meson_args(self):
elif lapack != "openblas":
lapack = "netlib"
lapack_opt = "-Dlapack={0}" if self.version > Version("6.6.0") else "-Dla_backend={0}"
lapack_opt = "-Dlapack={0}" if self.version >= Version("6.6.0") else "-Dla_backend={0}"
return [
lapack_opt.format(lapack),