quantum-espresso: support libxc also for autotools build (#30895)

This commit is contained in:
Simon Pintarelli 2022-06-06 14:26:07 +02:00 committed by GitHub
parent 73ce789390
commit 8ef937032c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,16 +56,15 @@ class QuantumEspresso(CMakePackage):
with when('+cmake'):
depends_on("cmake@3.14.0:", type="build")
conflicts('@:6.7', msg='+cmake works since QE v6.8')
variant('libxc', default=False, description='Uses libxc')
depends_on('libxc@5.1.2:', when='+libxc')
# TODO
# variant(
# 'gpu', default='none', description='Builds with GPU support',
# values=('nvidia', 'none'), multi=False
# )
variant('libxc', default=False, description='Uses libxc')
depends_on('libxc@5.1.2:', when='+libxc')
variant('openmp', default=False, description='Enables openMP support')
# Need OpenMP threaded FFTW and BLAS libraries when configured
# with OpenMP support
@ -466,6 +465,10 @@ def install(self, spec, prefix):
scalapack_lib = spec['scalapack'].libs
options.append('SCALAPACK_LIBS={0}'.format(scalapack_lib.ld_flags))
if '+libxc' in spec:
options.append('--with-libxc=yes')
options.append('--with-libxc-prefix={0}'.format(spec['libxc'].prefix))
if '+elpa' in spec:
# Spec for elpa