Changed every 'fpic' variant to 'pic' (#4969)
* Changed every 'fpic' variant to 'pic'. fixes #2463 Every variant that activates compilation of position independent code has been changed to 'pic'. Hardcoded compiler flags in packages have been substituted with `self.compiler.pic_flag`. * Changed literal uses of '-fpic' to 'self.compiler.pic_flag'
This commit is contained in:

committed by
GitHub

parent
452f382293
commit
9be294de31
@@ -46,9 +46,9 @@ class NetlibScalapack(CMakePackage):
|
||||
description='Build the shared library version'
|
||||
)
|
||||
variant(
|
||||
'fpic',
|
||||
'pic',
|
||||
default=False,
|
||||
description='Build with -fpic compiler option'
|
||||
description='Build position independent code'
|
||||
)
|
||||
|
||||
provides('scalapack')
|
||||
@@ -87,10 +87,10 @@ def cmake_args(self):
|
||||
'-DBLAS_LIBRARIES=%s' % (blas.joined(';'))
|
||||
])
|
||||
|
||||
if '+fpic' in spec:
|
||||
if '+pic' in spec:
|
||||
options.extend([
|
||||
"-DCMAKE_C_FLAGS=-fPIC",
|
||||
"-DCMAKE_Fortran_FLAGS=-fPIC"
|
||||
"-DCMAKE_C_FLAGS=%s" % self.compiler.pic_flag,
|
||||
"-DCMAKE_Fortran_FLAGS=%s" % self.compiler.pic_flag
|
||||
])
|
||||
|
||||
return options
|
||||
|
Reference in New Issue
Block a user