Fix scalapack build error (#19824)
This commit is contained in:
parent
a99cc0fac0
commit
821b195ba4
1 changed files with 14 additions and 3 deletions
|
@ -73,11 +73,22 @@ def cmake_args(self):
|
|||
'-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
|
||||
|
||||
|
|
Loading…
Reference in a new issue