From 8ef937032c6493b0cb634201fc591ab51eef2f6d Mon Sep 17 00:00:00 2001 From: Simon Pintarelli <1237199+simonpintarelli@users.noreply.github.com> Date: Mon, 6 Jun 2022 14:26:07 +0200 Subject: quantum-espresso: support libxc also for autotools build (#30895) --- var/spack/repos/builtin/packages/quantum-espresso/package.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py index c19e1f2af9..8177fd157d 100644 --- a/var/spack/repos/builtin/packages/quantum-espresso/package.py +++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py @@ -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 @@ class QuantumEspresso(CMakePackage): 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 -- cgit v1.2.3-60-g2f50