Fix for building METIS 4.0.3 with '~shared'. (#7202)
This commit is contained in:
parent
d393e3d702
commit
9c7e82a348
1 changed files with 5 additions and 3 deletions
|
@ -100,7 +100,9 @@ def patch(self):
|
|||
@when('@:4')
|
||||
def install(self, spec, prefix):
|
||||
# Process library spec and options
|
||||
options = ['COPTIONS={0}'.format(self.compiler.pic_flag)]
|
||||
options = []
|
||||
if '+shared' in spec:
|
||||
options.append('COPTIONS={0}'.format(self.compiler.pic_flag))
|
||||
if spec.variants['build_type'].value == 'Debug':
|
||||
options.append('OPTFLAGS=-g -O0')
|
||||
make(*options)
|
||||
|
@ -144,8 +146,8 @@ def install(self, spec, prefix):
|
|||
|
||||
# Set up and run tests on installation
|
||||
ccompile('-I%s' % prefix.include, '-L%s' % prefix.lib,
|
||||
self.compiler.cc_rpath_arg +
|
||||
'%s' % (prefix.lib if '+shared' in spec else ''),
|
||||
(self.compiler.cc_rpath_arg + prefix.lib
|
||||
if '+shared' in spec else ''),
|
||||
join_path('Programs', 'io.o'), join_path('Test', 'mtest.c'),
|
||||
'-o', '%s/mtest' % prefix.bin, '-lmetis', '-lm')
|
||||
|
||||
|
|
Loading…
Reference in a new issue