diff options
author | Jean-Paul Pelteret <jppelteret@gmail.com> | 2020-11-12 15:55:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-12 08:55:58 -0600 |
commit | 821b195ba4f6893002b569036f5bdb29369bd727 (patch) | |
tree | 4e0ed4ec5d3ba804fcd89b06da7763c77fddf008 /var | |
parent | a99cc0fac09a9908d4605bfb7d52289a9e0944c6 (diff) | |
download | spack-821b195ba4f6893002b569036f5bdb29369bd727.tar.gz spack-821b195ba4f6893002b569036f5bdb29369bd727.tar.bz2 spack-821b195ba4f6893002b569036f5bdb29369bd727.tar.xz spack-821b195ba4f6893002b569036f5bdb29369bd727.zip |
Fix scalapack build error (#19824)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/netlib-scalapack/package.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index 171d0eb6c9..51fa58d0e6 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -73,11 +73,22 @@ class ScalapackBase(CMakePackage): '-DBLAS_LIBRARIES=%s' % (blas.joined(';')) ]) + c_flags = [] if '+pic' in spec: - options.extend([ - "-DCMAKE_C_FLAGS=%s" % self.compiler.cc_pic_flag, + c_flags.append(self.compiler.cc_pic_flag) + options.append( "-DCMAKE_Fortran_FLAGS=%s" % self.compiler.fc_pic_flag - ]) + ) + + # Work around errors of the form: + # error: implicit declaration of function 'BI_smvcopy' is + # invalid in C99 [-Werror,-Wimplicit-function-declaration] + if spec.satisfies('%clang') or spec.satisfies('%apple-clang'): + c_flags.append('-Wno-error=implicit-function-declaration') + + options.append( + self.define('CMAKE_C_FLAGS', ' '.join(c_flags)) + ) return options |