diff options
author | Veselin Dobrev <v-dobrev@users.noreply.github.com> | 2018-02-13 02:22:25 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-02-13 02:22:25 -0800 |
commit | 9c7e82a3489241dd7e54b59fa9ace8d28bc1dfd4 (patch) | |
tree | 32bcab1f90abbe9592742fcb340f7bc201867006 /var | |
parent | d393e3d7027a95f4dff31e5b2cfba32cacf0815c (diff) | |
download | spack-9c7e82a3489241dd7e54b59fa9ace8d28bc1dfd4.tar.gz spack-9c7e82a3489241dd7e54b59fa9ace8d28bc1dfd4.tar.bz2 spack-9c7e82a3489241dd7e54b59fa9ace8d28bc1dfd4.tar.xz spack-9c7e82a3489241dd7e54b59fa9ace8d28bc1dfd4.zip |
Fix for building METIS 4.0.3 with '~shared'. (#7202)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/metis/package.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 30f457da6b..9c4016625d 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -100,7 +100,9 @@ class Metis(Package): @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 @@ class Metis(Package): # 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') |