Fix scalapack build error (#19824)
This commit is contained in:
parent
a99cc0fac0
commit
821b195ba4
@ -73,11 +73,22 @@ def cmake_args(self):
|
|||||||
'-DBLAS_LIBRARIES=%s' % (blas.joined(';'))
|
'-DBLAS_LIBRARIES=%s' % (blas.joined(';'))
|
||||||
])
|
])
|
||||||
|
|
||||||
|
c_flags = []
|
||||||
if '+pic' in spec:
|
if '+pic' in spec:
|
||||||
options.extend([
|
c_flags.append(self.compiler.cc_pic_flag)
|
||||||
"-DCMAKE_C_FLAGS=%s" % self.compiler.cc_pic_flag,
|
options.append(
|
||||||
"-DCMAKE_Fortran_FLAGS=%s" % self.compiler.fc_pic_flag
|
"-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
|
return options
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user