From 22329c4f92cf388618479988e43168c5eb751686 Mon Sep 17 00:00:00 2001 From: Simon Pintarelli <1237199+simonpintarelli@users.noreply.github.com> Date: Thu, 27 Aug 2020 14:45:55 +0200 Subject: [PATCH] sirius, q-e-sirius (#18286) * sirius: fix bug in shared spec make +shared the default * q-e-sirius: depend on sirius+shared, fix gcc@10 - add missing whitespace in -fallow-argument-mismatch. - require sirius+shared --- var/spack/repos/builtin/packages/q-e-sirius/package.py | 5 ++--- var/spack/repos/builtin/packages/sirius/package.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/q-e-sirius/package.py b/var/spack/repos/builtin/packages/q-e-sirius/package.py index 7eed92f5d4..115b9def07 100644 --- a/var/spack/repos/builtin/packages/q-e-sirius/package.py +++ b/var/spack/repos/builtin/packages/q-e-sirius/package.py @@ -57,7 +57,7 @@ class QESirius(Package): depends_on('blas') depends_on('lapack') depends_on('fftw-api@3') - depends_on('sirius+fortran') + depends_on('sirius+fortran+shared') depends_on('mpi', when='+mpi') depends_on('scalapack', when='+scalapack+mpi') depends_on('elpa+openmp', when='+elpa+openmp') @@ -172,7 +172,6 @@ def install(self, spec, prefix): options = ['-prefix={0}'.format(prefix_path)] sirius = spec['sirius'] - options.append('LIBS={0}'.format(sirius.libs[0])) options.append('LD_LIBS={0}'.format(sirius.libs[0])) @@ -203,7 +202,7 @@ def install(self, spec, prefix): f90flags = 'F90FLAGS=-cpp -I {0}/sirius'.format(header_dir) if self.spec.satisfies('%gcc@10:'): - f90flags += '-fallow-argument-mismatch' + f90flags += ' -fallow-argument-mismatch' options.append(f90flags) diff --git a/var/spack/repos/builtin/packages/sirius/package.py b/var/spack/repos/builtin/packages/sirius/package.py index 08ea866b56..4576876884 100644 --- a/var/spack/repos/builtin/packages/sirius/package.py +++ b/var/spack/repos/builtin/packages/sirius/package.py @@ -44,7 +44,7 @@ class Sirius(CMakePackage, CudaPackage): 'gfx1011', 'gfx1012' ) - variant('shared', default=False, description="Build shared libraries") + variant('shared', default=True, description="Build shared libraries") variant('openmp', default=True, description="Build with OpenMP support") variant('fortran', default=False, description="Build Fortran bindings") variant('python', default=False, description="Build Python bindings") @@ -161,8 +161,7 @@ def _def(variant, flag=None): _def('+rocm') ] - if '@:6.2.999' in self.spec: - args += [_def('+shared', 'BUILD_SHARED_LIBS')] + args += [_def('+shared', 'BUILD_SHARED_LIBS')] lapack = spec['lapack'] blas = spec['blas']